Application Security - Task failed

Hello guys,

Task regarding the application security in which we have to create rules in firewall iptable to allow all traffic in Nginx and deny all in apache.

I think I did it correctly but still, the task failed.

Can anyone please help me understanding where I did wrong or what I missed here?

Thank-you in advance.

Hi!

Did you make rules permanent as well?

Hello,

Yes I made the rules permanent.

because you have restarted the service of iptables instead of save.

Hello @player001,

First I saved the service iptables with iptables-save and after that, I restarted the service.

So, rules should be permanent.

Waiting for your revert.

Thanks

@Inderpreet Can you please check this and clear my doubt?

Thank you

@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.

@Inderpreet Thank you for the clearing my doubt.