Click to See Complete Forum and Search --> : Telnet Relay


brants
04-26-2004, 02:01 PM
I would like the linux box I am currently running to redirect the users when they login to a different computer. For example if I were to telnet to the linux machine upon logging on I would like it to reroute them to 120.101.101.1 Is there any way to do this?

Icarus
04-26-2004, 02:08 PM
You should be able to re-direct connections using iptables. I don't know much about this myself, but from what I've seen with iptables it should not be difficult to make a redirect like that...search around on http://google.com/linux for "iptable redirect"

maccorin
04-26-2004, 02:26 PM
with iptables what your looking for is the DNAT target on the PREROUTING table

i've personally used this on a network that i was MASQUERADING for, I'm not sure of the consequences if you are forwarding to a public ip though, you may have to use some SNAT rules on the way back out then as well, but i'm not sure. there are a quite a few good iptables scripts you can find on google for examples. Watch for the DNAT target though.

Hope that helps

maccorin
04-26-2004, 02:29 PM
one more semi-OT suggestion,

I would _strongly_ advise against telnet. Look into ssh instead (you can use putty to connect to an ssh server from windows, or just 'ssh' in linux). As it is encrypted so you won't be passing all those passwds over the network in clear-text :)