To Block All Incoming Traffic
# vi firewall iptables -F iptables -A INPUT -j REJECT :wq!
check from client
To Allow a Ip
#vi firewall iptables -F iptables -A INPUT -s 192.168.1.20 -j ACCEPT iptables -A INPUT -j REJECT :wq!
and check from client
TO BLOCK A PORT
#vi firewall
iptables -Fiptables -A INPUT -p tcp --dport 22 -j REJECT
:wq!
check from client
TO BLOCK A PORT# vi firewall
iptables -F
iptables -A INPUT -s 192.168.1.10 -p tcp --dport 22 -j ACCEPTiptables -A INPUT -p tcp --dport 22 -j REJECT
:wq!
check from client
To Block The Multiple Port
#vi firewall
iptables -F
iptables -A INPUT -m multiport -p tcp –dport 22,80 -j REJECT
:wq!
and check from client
To Block The Multiple Port
#vi firewall
iptables -F
iptables -A INPUT -m multiport -s 192.168.1.20 -p tcp –dport 22,80 -j ACCEPT
iptables -A INPUT -m multiport -p tcp –dport 22,80 -j REJECT
:wq!
and check from client