Disable tenet (port 23) on CentOS 7
I am a new Linux admin setting up a brand new Linux virtual machine (VM). When I do a uname -r, I see it is running 3.10.0-1160.83.1.el7.x86_64, which I assume is CentOS.
About a week after the machine was turned up, I got an email from security stating they had performed a port scan on my machine and detected that telnet (port) 23 was turned on. They asked me to turn it off. I immediately started Googling and found many references about editing /etc/xinetd.d/telnet. Most state that I open # vi /etc/xinetd.d/telnet and change diable=no to disable=yes. Unfortunately, there is no such file /etc/xinetd.d/telnet on my machine to edit. So, I am looking for an alternative way to permanently disable telnet port 23. |
Quote:
Code:
NAME="openSUSE Tumbleweed" Quote:
Code:
systemctl is-enabled telnet.socket Code:
systemctl disable telnet.socket That said, why on EARTH would you be putting a NEW CentOS7 server in place??? It's very old, and will hit end-of-life soon. Use a current version of Linux on a new server. |
Welcome to LinuxQuestions.
Is this some type hosted virtual machine? By default CentOS does not automatically install telnet (it is a stand alone server and does not run under xinetd) so I would think that would be on your hosted service provider. Have you verified that telnet or anything is running or port 23? As root or via sudo try running the command on the server: lsof -i:23 |
The configs could be also /etc/xinetd.conf or maybe /etc/inetd.conf if using Inetd.
Quote:
|
One option might be to block the port in the firewall.
|
I checked the version:
Code:
# cat /etc/*release* Code:
# systemctl is-enabled telnet.socket |
Quote:
|
All times are GMT -5. The time now is 09:35 AM. |