小编tra*_*dex的帖子

iptables 规则不再受尊重

我一周前安装了 Ubuntu Server 64 位 14.04。它工作了一到几天,然后突然之间,iptables 变得毫无意义(我注意到 FTP 等都关闭了)。只有端口 22、25 和 80 是开放的。iptables -S看起来不错,但由于某种原因不再受到尊重。刷新和所有端口都没有打开,只有 22、25 和 80。没有安装网络管理器(我也验证过)。我没有任何其他防火墙...我不明白?

/etc/network/interfaces

auto lo
iface lo inet loopback

auto em1
iface em1 inet static
        address XX.15.191.XXX
        netmask 255.255.255.240
        gateway XX.15.191.XXX
        dns-nameservers XX.105.28.XX

pre-up iptables-restore < /etc/iptables.rules
post-down iptables-restore > /etc/iptables.downrules
Run Code Online (Sandbox Code Playgroud)

/etc/hosts

127.0.0.1       localhost
127.0.1.1       MY-SERVER.ph.cox.net   MY-SERVER
XX.15.191.XXX   mysite.com

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Run Code Online (Sandbox Code Playgroud)

/etc/hostname

MY-SERVER
Run Code Online (Sandbox Code Playgroud)

/etc/resolv.conf (未设置为我的,如果我理解正确则自动设置): …

iptables firewall

5
推荐指数
1
解决办法
4430
查看次数

标签 统计

firewall ×1

iptables ×1