Hi All i want to change my the default port number for telnet services from 23 to say 2345. I have enabled the iptables rule to accept traffic from 2345 port , but still i am getting connection refused error. I have made following entry ion my iptables.

iptables -A INPUT -p tcp --dport 2345 -J ACCEPT

and reloaded the iptables file

  • Hi! Can you please edit your post to show us the relevant part of any server configuration files you changed? – dhag Oct 23 '15 at 20:35
  • changes has been done – Raghav Chadha Oct 23 '15 at 20:37
  • How is you telnetd started? Via inetd? – Thomas Weinbrenner Oct 23 '15 at 20:38
  • Did you change the telnet server configuration as well, so that it listens to a non-default port? – dhag Oct 23 '15 at 20:39
  • telnet is started via xinetd – Raghav Chadha Oct 23 '15 at 20:39

I edited /etc/xinetd.conf

service telnet
port 2345
#service xinetd restart

and now it works.

| improve this answer | |

If you edit /etc/services line:

telnet          23/tcp


telnet          2345/tcp

and restart telnetd or xinetd or inetd will work for sure.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.