TASK - Application Security Failed

Hello Team,

I got message as task failed with the below reason.
Check the below attached image for reference

I have done the below steps to complete the tasks :-
firewall-cmd --zone=public --add-port=8094/tcp --permanent
firewall-cmd --reload
iptables-save | grep 8094
Check the below attached image to ACCEPT the connection from 8094 port.

To block all connection on apache port I have done the below tasks :-
iptables -A INPUT -p tcp --destination-port 3003 -j DROP
service iptables save
Check the below image output for DROP the 3003 port connection.

@Inderpreet, @mmumshad, @kodekloud-support3
Please check the tasks again as I have done all the correct steps to complete.

Also, please let me know what I have done wrong while doing this task.

Thanks You,

Hi Akshay,

If the question is about using firewalld and not iptables, then you have to use only firewalld.

Did you check if your port is listed after you ran below command for verification of your task.

firewall-cmd --zone=public --list-all

Now, I do not remember that I have run that command or not.
But, i have cross-checked all the questions which is asked and output is showing perfect.

But, still confusing like what I did wrong there.?

The task is again assigned for me.
I did the below steps to complete.
I have added the rules for both the apache and nginx port to accept and drop the connections.
But still the task has been marked as failed.

First, I have added the rule for Nginx to accept the connection on 8091 port.
Below is the screenshot of my command.

Next, I have added the rule for Apache to block the connection from 8087 port.

Next, I have executed the command iptables-save command to save that rule permanenetly and checked in /etc/sysconfig/iptables file.

Rules are added permanenetly in above file.

But, still my task was failed and with the below reason.
Either firewall rule was not added for Nginx port (8091) or rule was not permanently added on Backup server.

@Inderpreet @kodekloud-support3 @Ayman @mmumshad Can you please check this task again.?

Please let me know what I did wrong here so that I will avoid that steps next time.

As I have also seen on community, other users are also done same steps to complete this same Application Security task but still these task also get failed and after checking from your side , the task marked as completed as they performed the correct steps.

Thank you,

hi @AkshayT

i think you need to start iptables with systemctl start iptables
and check status of iptables with systemctl status iptables

but i am not sure !

Thanks Shubham for your response.
Service is already in running state.

Also, there was some another issue and that I came to know.

I have completed and finished the task.