Basic operations with rules

In this video we will filter SSH connections, and practice managing rules - append a rule to the end of a chain, insert a rule on the specified line number in a chain, we will see how to replace one rule with another one, and how to delete one rule or all of them. 

The commands from the video:

# iptables -A INPUT -p tcp --dport 22 -j ACCEPT


in putty (you can download it here:  

{ip address -, use the default port 22}


# iptables -A INPUT -p tcp --dport 22 -i eth0 -j DROP

# iptables -I INPUT -p tcp --dport 22 -i eth0 -j DROP

# iptables -D INPUT 3

# iptables -R INPUT 2 -p tcp --dport 22 -s -j DROP

# iptables -F

Complete and Continue