Iptables installation and configuration Issue

Hi team,
I hope you guys are doing well.
I was doing a task of iptables installation and configuration where I am facing an issue. Though I had configured and implemented the tables as per the assigned task when I checked it showed no route to host while I defined the routes.

Hi,
Can you show what is the rule for iptable you apply ?
iptables -L

And please send your iptable commands here if you can

In my case:
iptables -A INPUT -p tcp --destination-port 8082 -s 172.16.238.14 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 8082 -j DROP
service iptables save

I dont have iptables -L screen shot but I shared the commands for my specific case

I attempted this task about 4 times so the ports I mentioned earlier are different.

iptables -A add the rule at the end and if there is a deny all before your rule will not be execute.
you must insert these rule in the good range.
use iptable -I

1 Like

I did it again and today i was facing an issue at the app03 server. But I found the solution. I didn’t start the service until I implement the rule and then restart the iptables and it worked :slight_smile: It means the rule I implemented was correct. By the way, thank you guys for the prompt responses.