Linux security & iptables rules
拒绝掉所有ip访问本地的8080端口,除开本地ip:
1 2 3 4 5 6 7 |
iptables -I INPUT -p tcp --dport 8080 -j DROP iptables -I INPUT -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT service iptables save service iptables restart |
拒绝掉所有ip访问本地的8080端口,除开本地ip:
1 2 3 4 5 6 7 |
iptables -I INPUT -p tcp --dport 8080 -j DROP iptables -I INPUT -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT service iptables save service iptables restart |
No Comments