When Linux opens the firewall, you will find that it is no problem to log on to port 23 from the local computer, but if you log in to the Linux system from another PC, you will find that you are prompted with such an error:
Cannot open connection to host on port 23: Connection Failed
Because the Linux firewall is closed by default 23 port, if you allow remote login, you can switch off the firewall, or open a firewall open 23 port, as follows:
Immediate effect, fail after reboot
Open: Service iptables start
Close: Service iptables stop
Effective after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
When the firewall is turned on, make the following settings to open the relevant port
Modify the/etc/sysconfig/iptables file to add the following:
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 23-j ACCEPT
Modify the firewall configuration needs to modify/etc/sysconfig/iptables This file, if you want to open which port, add a bar inside.
-A rh-firewall-1-input-p tcp-m state--state new-m TCP--dport 80-j ACCEPT
Yes, where 80 is the port number to open, and then restart the Linux Firewall service.
Adding ports into the firewall