Hi Team,
I have followed these steps in all the application servers.
Install and Enable Iptables:
Perform the following steps to install Iptables on a CentOS 7 system:
- Run the following command to install the iptables-service package from the CentOS repositories:
yum install iptables-services
- Once the package is installed start the Iptables service:
systemctl start iptables
systemctl start ip6tables
3.Enable the Iptables service to start automatically on system boot:
systemctl enable iptables
systemctl enable ip6tables
4.Check the iptables service status with:
systemctl status iptables
systemctl status ip6tables
- To check the current iptables rules use the following commands:
iptables -nvL
ip6tables -nvL
- To block incoming port # 6100, use the below command.
iptables -A INPUT -p tcp --destination-port 6100 -j DROP
7.Save the iptables for rules to be persistent across reboots.
service iptables save
8.To block outgoing port # 6100, use the below command.
iptables -A OUTPUT -p tcp --destination-port 6100 -j DROP
9.Save the iptables for rules to be persistent across reboots.
service iptables save
But it is marked as Failed and in between my session got disconnected before finishing.Please do check and let me know where i made mistake.