Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Route add: Telnet to a machine out from my LAN

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hello.

Inside my LAN (192.168.1.x) the gateway is 192.168.1.17 (RedHat 7.1.)

This gateway's got two etherlans:
+ eth0: 192.168.1.17
+ eth1: 200.200.200.200 (an IP on the Internet)

I would like to make 'telnet' to IP 200.200.147.8 (an IP on the Internet) from any machine within my LAN.

So I began to perform 'route add's, but sometimes I get "Network unreachable" error, and other times, it does not work.

I would be extremely obliged if anybody could give me a tip.

Regards.
 
Since you are running non-routable IP's on your LAN, you will need to use IPChains on your redhat box so that the routing will work. You will not need to modify the routing table.

It sounds like you have the internal lan setup corectly (using the LAN IP of the RedHat machine as the gateway).

Good Luck!
 
Thank you very much.

Must I install 'ipchains', or is it already installed?
 
I changed 'proc/sys/net/ipv4/ip_forwarding' to '1'.

I added also:

ipchains -A forward -i eth0 -s 192.168.1.0/24 -j MASQ

But I'm not able to make nor 'ping' neither 'telnet'.

What am I doing wrong? Thank you very much.
 
Chain input (policy ACCEPT):
Chain forward (policy ACCEPT):
target prot opt source
destination ports
MASQ all ------ 192.168.1.0/24 anywhere
n/a
Chain output (policy ACCEPT):
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top