In my Centos Server I want to open the port number of (2555) in the iptables, I executed the following command
iptables -A INPUT -p tcp --dport 5901 -j ACCEPT
Port is not working from am trying to access the server, then I defined the same rule in the same server as mentioned, its working fine
iptables -I INPUT -p tcp -m tcp --dport 5901 -j ACCEPT
I need what was wrong with first command and what is the difference of both ?
Please refer any iptables links to learn thanks.