Hi There ,
I got this task of creating iptables rules for accepting all the incoming connections to the Nginx port 8093 and Blocking all the incoming connections to the Apache port 8083. I have added the following rules
sudo iptables -A INPUT -p tcp --dport 8093 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 8083 -m conntrack --ctstate NEW -j REJECT
and executed both
sudo service iptables save and
iptables-save to save it permanently. And I was able to see the rules in the files /etc/sysconfig/iptables and /etcsysconfig/iptables.save
But the task has been marked failed with the reason as
Either firewall rule was not added for Apache port (8083) or rule was not permanently added on Backup server.
Could anyone let me know where it has went wrong.