How to open a port for TELNET in local network

Support for security such as Firewalls and securing linux
danielti
Posts: 7
Joined: 2015/12/03 13:09:44

Re: How to open a port for TELNET in local network

Post by danielti » 2015/12/03 17:15:04

TrevorH wrote:Amending that file does nothing unless you restart the iptables service to pick it up. Be aware that doing that while people are using it will be service affecting. You can also run iptables -A FORWARD -p tcp -m tcp --dport 5003 -j ACCEPT to amend the running ruleset without restarting the service.

Whenever you amend iptables rules it is best to use the iptables command directly to affect the running rules. That way if you got it wrong and lock everyone out then you can reboot the machine or restart the service and it will come back up using the old rules from /etc/sysconfig/iptables. Once you've verified that the manually added rules work and do what you expect then you can run service iptables save to save the running rules to /etc/sysconfig/iptables so that they persist over reboots.
I tried that too, but the client always shows "server unexpectedly closed network connection".


Thanks !

danielti
Posts: 7
Joined: 2015/12/03 13:09:44

Re: How to open a port for TELNET in local network [SOLVED]

Post by danielti » 2015/12/03 19:37:17

Just adding

Code: Select all

-A FORWARD -p tcp -m tcp --dport 5003 -j ACCEPT
To /etc/sysconfig/iptables and restart the service works. The errors before were caused by some bad configuration on the remote server as the admin told me.

Thanks anyway for the patience. Best regards

Post Reply