Iptables installation and configuration task

hello there,

I have tried the iptables installation and configuration tasks more than 5 times but not getting the solution, seems like I’m somewhere going wrong. Can anyone please guide me here?

Output: - Apache service on App Server 1 is not reachable from the LB host
FAILED test_stlb01.py::test_stlb01 - AssertionError: - Apache service on App …

I’m executing the below script on all app servers:

#! /bin/bash

value=8083
server=stapp01

yum install -y iptables-services

systemctl start iptables

systemctl enable iptables

iptables -I INPUT -p tcp --dport $value -j DROP
iptables -I INPUT -p tcp -s 172.16.238.14 --dport $value -j ACCEPT
iptables -R INPUT 5 -p icmp -j REJECT

service iptables save

systemctl restart iptables

curl -I $server:$value


I have also tried with the below script:

#! /bin/bash

value=8083
server=stapp01

yum install -y iptables-services

systemctl start iptables

systemctl enable iptables

iptables -A INPUT -p tcp -s 172.16.238.14 --dport $value -j ACCEPT
iptables -A INPUT -p tcp --dport $value -j DROP
iptables -R INPUT 5 -p icmp -j REJECT

service iptables save

systemctl restart iptables

curl -I $server:$value

HI @syedyakhub9966,

Can you please mark the task to review and the share the link here please

Regard

1 Like

Hi @mmkmou

Thanks for the message, please find the link here

Hi everyone,

Thanks for the support, I have received feedback on the review page. I have completed the task successfully

Thanks to KK Community

1 Like

Can you share how you solved this task, as i also ran the same commands and still getting Apache service on App Server 1 is not reachable from the LB host

Hi @anirudh_hyphen

What is the course name, level, and task name? I’ll check it.