How To Allow Telnet Through IPTables Under Centos / RedHat

by lifeLinux on May 10, 2011

CentOS / RedHat Linux server and by default firewall blocked out everything including telnet access. How do I allow telnet – port 23 thought Linux iptables firewall ?

Method 1:

Login as root account and type the following command

[root@lifelinux ~]# iptables -A INPUT -m state --state NEW -p tcp --dport 23 -j ACCEPT

Save rule to /etc/sysconfig/iptables

[root@lifelinux ~]# iptables-save > /etc/sysconfig/iptables

Method 2:

Login as the root user and open /etc/sysconfig/iptables file, enter:

[root@lifelinux ~]# vi /etc/sysconfig/iptables

Add the following line:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT

The final:

Save and close the file. Restart the firewall:

[root@lifelinux ~]# /etc/init.d/iptables restart

Related Posts:

Previous post:

Next post: