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