@Priyanshu
When you simply run iptables-save command you have to provide the file path to save rules into otherwise it will just display the output in stdout.
Either you should have provided /etc/sysconfig/iptables file path or you could simply use service iptables save which saves rules in /etc/sysconfig/iptables file.
I got this task failed with below error
Either firewall rule was not added for Apache port (5004) or rule was not permanently added on Backup server.
I used below command for same
iptables -A OUTPUT -p tcp --dport 5004 -j DROP
iptables -A INPUT -p tcp --dport 8098 -j ACCEPT
service iptables save
service iptables restart
chkconfig iptables on
My nginx port was there in config but not for apache.
@Sidharth as I checked the question it was asked to open Apache port for LBR host, the error is mentioning about backup server because all rules were needed to be added on backup server. You will get this task again sometime in future as you will be getting some repeated tasks for practice.
I have the same resolve response - failed.
I mention that I accept only ports 22 and 8091 for both ip4 and ip6 and reject all other ports, as you can see from /etc/sysconfig/iptables and …/ip6tables.
Only ports 22 and 8091 are accepted, all others are DROP.
It’s a wrong solution?