Application Security - Task marked as failed although correct according to me

Hi,

I have completed this “Application Security” task correctly according to me.

Have added the following rules -

iptables -A INPUT -p tcp --dport 8091 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -p tcp --dport 5000 -m conntrack --ctstate NEW -j REJECT

and then executed service iptables save as well as iptables-save to save these permanently.

But i received “Failure” with following mentioned

  • Either firewall rule was not added for Nginx port (8091) or rule was not permanently added on Backup server

Please check and let me know if i have done correctly or something missing.

Regards,
Gautam

i think you have to add ip addr of backup server too. Because it is blocked for all(5000) and opened for all(8091).

Thanks for your inputs.

@Inderpreet Can you please confirm if this is required.

I think that’s not required so need someone to please confirm if this is what’s missing or it should be right.

@gautamp Had the same issue with a similar assignment. See my post for details. Still waiting to hear why my solution (which was much like yours) was not correct or appropriate.

@Inderpreet @kodekloud-support3

Can any of you please let me know regarding this task done by me ?

I think this is done correctly by me. But if something’s missing, please correct me.

Waiting for anyone from support team to revert please !

@Inderpreet @mmumshad

Could anyone please verify if the task done as above was correct or not ?

Thanks,
Gautam

@gautamp

Sorry for delayed response. Actually after adding the rules you restarted iptables service (before running iptables save) which flushed those temporary rules. You must have to run save command before restarting the service.

Ok, thanks for your response.