我的centos服务器有一个iptables规则。
iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 50 -j REJECT --reject-with tcp-reset这段代码正在做类似防火墙的工作,但我不想阻止我的服务器ips。
我的服务器ips:
"127.0.0.1“、”我的服务器ip1“、”我的服务器ip2“等。
如何将它们从此ip表规则中删除?
非常感谢!
发布于 2014-02-24 04:42:05
只需使用:
# Loopback
iptables -I INPUT -s 127.0.0.1 -i lo -j ACCEPT
# Repeat for each SERVER_IP
iptables -I INPUT -s SERVER_IP -j ACCEPT请注意,这将打开SERVER_IPs的所有内容。YMMV取决于您想要允许的内容。
例如,如果您只想为这些IP打开HTTP端口:
# Loopback
iptables -I INPUT -s 127.0.0.1 -i lo -j ACCEPT
# Repeat for each SERVER_IP
iptables -I INPUT -s SERVER_IP -p tcp --dport 80 -j ACCEPThttps://stackoverflow.com/questions/21968353
复制相似问题