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.
@Inderpreet
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.
@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.
Source: https://linux.die.net/man/8/iptables-save
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