Connect two networks

Posted by Meek Barrios on Server Fault See other posts from Server Fault or by Meek Barrios
Published on 2012-06-16T00:23:00Z Indexed on 2012/06/16 3:18 UTC
Read the original article Hit count: 229

Filed under:
|
|

Connecting two different offices with a wireless link and linux boxes. Hardware: 2 CISCO RV42, 2 Dual Homed Linux Boxes running debian, 2 2Wire and 2 AirMax 5

Configuration is:

Office A
LAN A (10.1.1.0/24) -> RV42 A (WAN1 - 10.1.1.254) -> 2Wire A (Internet)
LINUX A ( ETH0 (LAN) 10.1.1.253, ETH1 (LINK) (10.1.3.3)

Wireless Link --- AirMax A <-> AirMax B connected as Wireless Bridge

Office B
LAN B (10.1.2.0/24) -> RV42 B (WAN1 - 10.1.2.254) -> 2Wire B (Internet)
LINUX B ( ETH0 (LAN) 10.1.2.253 -> ETH1 (LINK) (10.1.3.4)

Network configuration is:

LAN A - Default Gateway 10.1.1.254
RV42 A - Static Route 10.1.3.0/24 on 10.1.1.253
         Static Route 10.1.2.0/24 on 10.1.1.253
         Default on 192.168.1.1 (WAN1 Internet Access)
Linux A - ETH0 10.1.1.253 netmask 255.255.255.0 gw 10.1.1.254
          ETH1 10.1.3.3   netmask 255.255.255.0 gw 10.1.3.1
AIRMAX A - 10.1.3.1 netmask 255.255.255.0 gw 10.1.3.1

LAN B - Default Gateway 10.1.2.254
RV42 B - Static Route 10.1.3.0/24 on 10.1.2.253
         Static Route 10.1.1.0/24 on 10.1.2.253
         Default on 192.168.1.1 (WAN1 Internet Access)
Linux B - ETH0 10.1.2.253 netmask 255.255.255.0 gw 10.1.2.254
          ETH1 10.1.3.4   netmask 255.255.255.0 gw 10.1.3.2
AIRMAX B - 10.1.3.2 netmask 255.255.255.0 gw 10.1.3.2

Both linux have ip_forward set to 1 and the following on the iptables:

iptables -F
iptables -X
iptables -P FORWARD ACCEPT
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT

I can ping from Linux B any ip on 10.1.1.0/24 segment and on linux A any ip on 10.1.2.0/24 segment however I cannot connect to HTTP or FTP on those machines. From LAN A I cannot see any other network.

I'm looking for some advice for this configuration or a better solution.

Regards

© Server Fault or respective owner

Related posts about linux

Related posts about iptables