Allow tcp port 80 from source address 192.168.10/24
iptables -A INPUT -i 10 -P TCP -S 192.168.1.0/24 --dport 80 -j ACCEPT
Drop tcp port 80 from range of addresses
iptables -A INPUT -i 10 -p tcp --dport 80 -m iprange --src-range 192.168.1.1-192.168.1.254 -j DROP
List chain with rule numbers
iptables -nL INPUT -v --line-numbers
Delete particular rule
iptables -D INPUT 10
iptables -A INPUT -i 10 -P TCP -S 192.168.1.0/24 --dport 80 -j ACCEPT
Drop tcp port 80 from range of addresses
iptables -A INPUT -i 10 -p tcp --dport 80 -m iprange --src-range 192.168.1.1-192.168.1.254 -j DROP
List chain with rule numbers
iptables -nL INPUT -v --line-numbers
Delete particular rule
iptables -D INPUT 10
Comments
Post a Comment