CentOS 7 iptables 將 SSH 封包標記為無效 - GCloud

CentOS 7 iptables 將 SSH 封包標記為無效 - GCloud

因此,我決定嘗試使用 GCloud 來託管我的一些小型專案。但是,當我在伺服器上配置 iptables 時,它會將 SSH 封包標記為無效。我不知道我是否做錯了什麼,或者問題是否出在谷歌身上。

IP表列表

來自 IPTable 的日誌訊息

Jan 14 18:26:04 ************ kernel: IPTables-Dropped: IN=eth0 OUT= MAC=42:01:0a:a6:00:03:42:01:0a:a6:00:01:08:00 SRC=82.102.20.179 DST=10.166.0.3 LEN=120 TOS=0x00 PREC=0x00 TTL=111 ID=6913 DF PROTO=TCP SPT=44759 DPT=22 WINDOW=1021 RES=0x00 ACK PSH URGP=0



327 39548 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate INVALID LOG flags 0 level 4 prefix "IPTables-Dropped: "

編輯我正在嘗試新增以下規則。

sudo iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP

iptables -S 輸出:

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

相關內容