One example: Prohibit an IP access to the server on the online server.
Iptables-i INPUT 2-s 220.96.133.0/24-i em1-j DROP
Prepare: According to the firewall policy order of each server to adjust, my server needs to plug in the front input 2, if inserted in the other effective policy, it will not take effect.
Cancel: iptables-d input-s 220.96.133.0/24-i em1-j DROP
Example: Prohibit an IP to access a port on this server.
Iptables-i INPUT 2-s 220.96.133.135/32-p tcp--dport 80-j DROP
Cancel: iptables-d input-s 220.96.133.135/32-p tcp--dport 80-j DROP
Example: Allow an IP to access a port on this server.
Iptables-i input-s 220.96.133.135/32-p TCP--dport 80-j ACCEPT
Cancellation: iptables-d input-s 220.96.133.135/32-p tcp--dport 80-j ACCEPT
Available: The above INPUT 2, according to the policy order of each server since the adjustment.
Iptables several commands