Restricting Telnet to IPs

Dear Experts,

Is there a way to restrict telnet to specific IPs

Thanks

Pls post in one forum at a time. Pls dont post duplicate posts.

Sorry Mr Killerserv...That was my first posting..I was not knowing

You can block outgoing telnet to a specific host from your machine by blocking data that's going out of your machine to that external host' port 23. If you are using Linux and iptables, you can use this

iptables -A OUTPUT -d <ip-of-blocked-host> --dport 23 -j DENY

If you are using Solaris, then you can do the blocking with ip filter.

-Sanjay

You can block outgoing telnet to a specific host from your machine by blocking data that's going out of your machine to that external host' port 23. If you are using Linux and iptables, you can use this

iptables -A OUTPUT -d <ip-of-blocked-host> --dport 23 -j DENY

If you are using Solaris, then you can do the blocking with ip filter.

-Sanjay

:slight_smile:

If you feel telnet service no need. Let's shutdown it for safe...

Let's use SSH...Bester and Safer than Telnet

they'res always the old and tired hosts.deny file, just add the following to it:
telnet: partialhost.domain.com, somedomain.com, somedude.com

but, you want to restric to where everyone *BUT* someone can get into telnet, then you should use the following rule in hosts.allow:
telnet: hostname.com
and then set hosts.deny to:
telnet: ALL

by the way, they are in the /etc directory.