Application Security Task

I believe that I have saved the iptables successfully, but the error message is saying that “Either firewall rule was not added for Nginx port (8097) or rule was not permanently added on Backup server.”

The screen shot iptables command shows that 8097 port is added into the iptables.

To test your configuration you can restart the iptables service and run iptable -L and check the config.

To save iptables configuration run
iptables-save > /etc/sysconfig/iptables

1 Like

Thank you very much for the reponse.

Sure I did the basic job, but i dind´t save and flush changes.

@asingh05, iptables-save does not save the rules

iptables-save is used to dump the contents of an IP Table in easily parseable format to STDOUT. Use I/O-redirection provided by your shell to write to a file.

So your rule was not permanently added. You can use a redirect on iptables-save output to /etc/sysconfig/iptables or service iptables save if you have iptables-services installed

Solution for the beginners: Application Security Kodekloud Solution