Re: simple linux router, redhat 9, no nat
From: Juha Laiho (Juha.Laiho_at_iki.fi)
Date: 12/25/03
- Previous message: Thomas Hettel: "Linux 2.6.0 no TCP-Connections to Internet"
- In reply to: glenn: "simple linux router, redhat 9, no nat"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Dec 2003 11:32:01 GMT
ggrant@thrivenetworks.com (glenn) said:
>I'm going crazy trying to make a simple router out of a redhat 9 box
>with 2 nics.
...
>main network is 192.168.168.0, 255.255.255.0
>
>test network (behind my so called router) is 192.168.170.0,
>255.255.255.0
>
>all i want to do is sit on the test network with an ip of
>192.168.170.10 and connect to hosts on the 192.168.168.0 network.
Ok.
>INTERNET GW 192.168.168.1, 255.255.255.0
> |
>LAN 192.168.168.0, 255.255.255.0
> |
>------------------Wanna-be ROUTER (Hedhat 9)
>eth1 192.168.168.3, 255.255.255.0, gw 192.168.168.1
>eth0 192.168.170.1, 255.255.255.0, gw (no idea what to use here)
>--------------------
No need for "gw" there (for eth0). A host only has one default gw.
> |
>TEST LAN 192.168.170.0, 255.255.255.0
> |
>TEST HOST 192.168.170.10, 255.255.255.0, gw 192.168.170.1
>
>from the test host i can ping 192.168.170.1 but i cannot ping
>192.168.168.3 or anything on the 192.168.168.0 network.
That you cannot ping even the "outside" interface of your router seems
rather strange -- this should be dependent only on basic routing on
the test host and on the gateway.
>I think it may just be that i don't have the routing tables set up
>right.
How is the routing set up on the test host?
How is the routing set up on the router?
How is the routing set up for machines in .168. network?
If Linux, use "netstat -rn" to display routing information.
For your router, I think there's nothing needed in addition to setting
the default gw, which you have already done.
For the machines in the .170. network, you should specify the default
gateway as .170.1 .
For the machines in the .168. network, you should specify the default
gateway as .168.1 . Additionally, either the router at .168.1 should
know about your .170. network located behind .168.3, or alternatively
the mahcines within .168. network should each have a static route set
up for the .170. network, to be routed using the .168.3 as the gateway
for that.
>I have iptables installed and i flushed all the rules to make
>sure iptables isn't cutting off the traffic. I have no idea if i need
>iptables rules for this project. My assumption is I don not unless i
>want to NAT. I don't want to nat, i just want to pass the traffic with
>real ips.
No need for iptables when you're only routing (as in this case).
Check tough that you have set the iptables chain policies to
ACCEPT, in addition to removing all the rules.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
- Previous message: Thomas Hettel: "Linux 2.6.0 no TCP-Connections to Internet"
- In reply to: glenn: "simple linux router, redhat 9, no nat"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|