iptables -I INPUT -s IP_ADDRESS -j ACCEPT iptables -A INPUT -j DROP --reject-with icmp-port-unreachable
kimw
2015-10-21 01:30:58 +08:00
上面一个不算不算。重来。
iptables -I INPUT -s IP_ADDRESS -p all --dport PORT -j ACCEPT # please fill up the IP_ADDRESS and PORT iptables -A INPUT -j DROP --reject-with icmp-port-unreachable
iptables -I INPUT -s IP_ADDRESS -p all --dport PORT1:PORT2 -j ACCEPT # please fill up the IP_ADDRESS, PORT1 and PORT2 iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable