How to change the default port number for Telnet in CentOS 7?

0

I need to enable Telnet in a port number other than 23. I installed use telnet through following procedure.

systemctl enable telnet.socket
systemctl start telnet.socket

I tried some procedure to change the port number but it is not working out.

Can you please let me know if there is any other way to change the default port number for Telnet in CentOS 7?

user3822453

Posted 2014-12-02T22:25:06.207

Reputation: 3

Why would you follow a guide about changing the SSH port when trying to configure Telnet? What EXACTLY did you try already? – Ƭᴇcʜιᴇ007 – 2014-12-02T22:35:03.450

i tried semanage port -a -t telnetd_port_t -p tcp 2323. But not working – user3822453 – 2014-12-02T22:40:27.347

Answers

0

You need to change systemd service unit definition file /usr/lib/systemd/system/telnet.socket. The section [Socket] has by default:

[Socket]
ListenStream=23

To change port number to which in.telnetd will respond to (via systemd), change 23 to 2323.

Sami Laine

Posted 2014-12-02T22:25:06.207

Reputation: 1 002

Thank you so much. It worked. I think you are the only one know the answer for this in earth :).. Because i couldn't find answer in google. searched a lot. – user3822453 – 2014-12-03T23:31:27.830