Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
At first, you will have to change the port, or add the additional 1000-number port that the telnet server will listen to.
At the moment your telnet server is listening on 23 port only, which is the default. You can add another port on which the
server will listen to and you will be able to have telnet to listen on both ports 23 and 1000 if you like.
At first, you will have to install xinetd, if you do not already have it installed. Inetd (the older version), is highly insecure and I would not recommend its use. The following example is based on the xinetd package.
Assuming you are using Ubuntu, or a Debian like Distro, in the console type:
root# apt-get install xinetd
in order to install the package. Then, edit the /etc/services file and put an entry for your modified telnet server
like this:
mytelnet 1000/tcp # My Telnet server
Then, go to /etc/xinetd.d/ directory and create a file called mytelnet containing the following:
service mytelnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
port = 1000
}
After that execute in the console:
root# /etc/init.d/xinetd restart
to restart xinetd and all should be in order. I would also suggest, if you were using inetd BEFORE installing xinetd, to go
to the /etc/inetd.conf file and commnent-out the line that looks like this:
Now try to telnet to port 1000 from another machine. In order to disable one of the telnet
services, simply go to the corresponding file in /etc/xinetd.d/ and change the line disable to 'yes'.
To add something to my previous post. If in the file /etc/services you see another service using port 1000, then choose another number for mytelnet. You will know if another service is using port 1000 if you see a line in the file looking
like this:
anotherService 1000/tcp # Another service comment or
anotherService 1000/udp # Another service comment
If you change the port number in here, then you must change it also in the /etc/xinetd.d/mytelnet file by
changing the 'port' section to the other number that you put in the /etc/services file in the mytelnet line.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.