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, 2015 at 20:35
  • changes has been done Oct 23, 2015 at 20:37
  • How is you telnetd started? Via inetd?
    – user90883
    Oct 23, 2015 at 20:38
  • Did you change the telnet server configuration as well, so that it listens to a non-default port?
    – dhag
    Oct 23, 2015 at 20:39
  • telnet is started via xinetd Oct 23, 2015 at 20:39

2 Answers 2


I edited /etc/xinetd.conf

service telnet
port 2345
#service xinetd restart

and now it works.


If you edit /etc/services line:

telnet          23/tcp


telnet          2345/tcp

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .