Application Security Error

Hi,

I have added the firewall rules for Nginx 3003 port and Apache 8096 port as directed in the instructions. However, when I ran the “service iptables save” command to make it work after reboot, it changed the iptables entries completely. Not sure why, I am new to this. Please find attached file. Also, this made my task to failed state, but I think I made it to the task. Can someone please check?

Thanks in advance

U can save iptables rules and apply them without reboot with:
sudo iptables-save > /etc/sysconfig/iptables

I have saved the iptables rules using the command — service iptables save. Isn’t that correct?

It works either, in my cas I apply 2 rules and I save them and after thzt I start the iptables, then I’ve check the 2 ports with curl - one it’s OK and the other KO

Well, I did the same thing. Added the rules and then saved the iptables. After that when I had cat the contents of iptables the added rules where not present and I failed the task.

My steps were:

  1. Add 2 rules for Nginx and Apache in /etc/sysconfig/iptables
  2. service iptables save
  3. cat /etc/sysconfig/iptables - This command output didn’t had my rules added in above step 1

What was wrong with this that my task failed?