Link to home
Start Free TrialLog in
Avatar of hfc_docsis
hfc_docsis

asked on

routing between 2 subnets

I have a 2 subnet (internal) network connected to a redhat 7.3 box with 2 nics. The linux box is the gateway to the internet for my 2 lans via ip MASQ configured in ipchains. Linux is connected to subnet A on eth1 and the internet on eth0 (just for clarity) for subnet B I have a linksys BEFW1154 which connects to subnet A throught the WAN port. I changed the linksys to router mode instead of gateway mode and the static routes are configured on both the linksys and the linux boxes. Here is the problem:  subnet A CAN communicate with subnet B and vise versa and Subnet A CAN access the internet but Subnet B CANNOT.

here is a layout of my configuration:

internet--Linux--LAN1-------------------------------------------LAN1--Linksys--LAN2
      |                   |                                                            |                    |
 68.x.x.x ---/---192.168.0.x                                     192.168.0.x---/--- 192.168.1.x(cannot
                                                                                                         (access public ips)  
Avatar of paullamhkg
paullamhkg

have a check this document which can give you the idea of using the iproute and  build the secure network http://lartc.org/howto/index.html
ASKER CERTIFIED SOLUTION
Avatar of paullamhkg
paullamhkg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hfc_docsis

ASKER

The problem was with my ipchains setup. I didnt have a rule to mask out from subnet B.
The statement was
ipchains -A forward -j MASQ -i eth0 -s 192.168.1.0/24 -d 0.0.0.0/0

Thanks