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:https://putty.org):  

{ip address - 192.168.0.10, 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 172.16.0.0/24 -j DROP

# iptables -F