Is this validation error OR did I miss something?
Step 1: Connected to all three app servers and elevated privilege as root user using sudo su.
Step 2: Installed Iptables on all 3 App servers. – SUCCESS.
Command used: yum install iptables-services -y
Step 3: Enabled and Started Iptables; later checked status to ensure it is active.
(1) systemctl enable iptables
(2) systemctl enable ip6tables
(3) systemctl start iptables
(4) systemctl start ip6tables
(5) systemctl status iptables -l
(6) systemctl status ip6tables -l
Step 4: Configured IPtables to accept tcp connections from load balancer on port 5004 and drop connections from everyone else on this port.
(1) iptables -A INPUT -p tcp --destination-port 5004 -s 172.16.238.14 -j ACCEPT
(2) iptables -A INPUT -p tcp --destination-port 5004 -j DROP
Step 5: Finally saved the rules to ensure they remain persistent across reboot.
Command used: service iptables save
Result: Task failed.
Command used to list rules: iptables -L --line-numbers
App Server 2 and 3 - Connection from Load Balancer is reachable (as per task failure message), and relevant rules that exist are as follows:
App Server 1 - Same steps performed - same rule exists as above (Num 6 and 7).
After task failure, thought of re-run the command one more time and check rules - it appended again as rule Num 8.
Can you please assist and point out the mistake?