[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Different telnet port number



It's even simper than that.
telnet is an application users use to connect to remote systems.
When a users connect to your computer,  your system runs a program
called in.telnetd. This program is runs by the inetd daemon.

The only thing both applications (telnet and in.telnetd) share is the service
name "telnet", but
that could be easily modified:

Add a line in services near the telnet service, only with a different service
name ("telnet2 for example") and a different port.

telnet          23/tcp
telnet2         1023/tcp

Now change the telnet service line in inetd.conf from "telnet" to
"telnet2" (or whatever you picked)
The commented line shows the original line and the other shows the changed
line

#telnet stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd
telnet2 stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd

Afterwards you have to restart the inetd daemon
(in RedHat it goes: /etc/rc.d/init.d/inet restart)

Test your configuration:

[rootyours]#telnet localhost
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

telnet localhost 1023 (the example port number) will work.

Enjoy!

"Dmitry Fink (aka FINiK)" wrote:

> Hi,
> I just redefined the telnet port on my machine in /etc/services,
> but it caused my telnet client to try to connect to that port
> on other servers as well. Is there a way tom make telnet client not
> to look in /etc/services? Or maybe I did it all wrong again, and there is
> some other way.

>                 Thank you in advance,
>                                 Dmitry
>
> ...Any errors in spelling, tact or fact are transmission errors :)
> ___________________________________________________________________________
>     _____ __  __ __  __  __ __
>    /     \  \/  \  \/  \/  /  \   Dmitry Fink /Technion - Electrical Eng./
>   /    __/   \      \   \    _/   E-Mail: finik@usa.net        IRC: FINiK
>   \   __/    /      /   /     \   Tel: 052-933459        ICQ UIN: 1963588
>    \__/  \__/\__\__/\__/\__\__/   HomePage:           http://finik.ml.org/
> ---------------------------------------------------------------------------
>   PGP: 1024/7773C0E9     73 8A 11 3C 1C 31 E7 DA  07 65 43 CA 4A 37 BC 02