open port iptables for ip address code example
Example 1: iptables open port
sudo iptables -A INPUT -p tcp --dport xxxx -j ACCEPT
Example 2: iptables block all ssh except 1 ip
iptables -A INPUT -p tcp --dport 22 -s YourIP -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j DROP