Iptabels is a package filtering firewall system integrated with the Linux kernel, and almost all Linux distributions contain iptables functionality. If a Linux system is connected to an Internet or LAN, server, or proxy server connecting the LAN and the Internet, the Iptables facilitates better control over IP packet filtering and firewall configuration on Linux systems.
1. View open ports:
#/etc/init.d/iptables Status
2. Open port: 8080
# /sbin/iptables-i input-p tcp--dport 8080-j ACCEPT
You can also add a line directly to the/etc/sysconfig/iptables:
-A rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 8080-j ACCEPT
Similarly, the other ports, as long as the replacement of 8080, the following open 22 port
#/sbin/iptables-i input-p TCP--dport 22-j ACCEPT
3. Then Save:
#/etc/rc.d/init.d/iptables Save
4. Restart the firewall for changes to take effect: (or restart the system directly)
# /etc/init.d/iptables restart
Note:
1. Turn off the firewall
# /etc/init.d/iptables stop
Or:
# Service iptables Stop # Services
2. Permanently shut down the firewall
# Chkconfig–level iptables off
This method originates from the network, not experimentally, and security considerations deny using this method
Linux Firewall Iptables Open port