Configuration Question on multiple servers and lans
Posted: Wed Oct 27, 2010 4:47 pm
This has been a side project of mine for a couple of years now. I'm trying to create a network of routers that interconnect using openvpn. I know how to get client -- server, lan -- server --server -- lan type connections but am wondering how Openvpn handles multiple links / paths to the same destination. I'm using Quagga + OSPF for the dynamic routing tables so that hasn't been a problem. This project is based on my experience working on DoD secure networks and how they tunnel trusted network connections across untrusted networks without cross talk. Its a civilian version of the HAIPE / TACLANE device. I'm using topology subnet for my connections.
The general idea is,
Gateway Router #1
eth0 => Internet / untrusted network x.x.x.x
eth1 => Lan / trusted network 192.168.10.0/24
tun0 => WAN VPN connection 10.1.10.0/24
tun1 => VPN UDP client connection 10.1.11.0/24
tun2 => VPN TCP port 433 client connections (stealth) 10.1.12.0/24
Gateway Router #2
eth0 => x.x.x.x
eth1 => 192.168.20.0/24
tun0 => WAN VPN connection 10.1.20.0/24
tun1 => VPN UDP, 10.1.21.0/24
tun2 => VPN TCP:433, 10.1.22.0/24
tun3 => client connection to Router #1 tun0
Gateway Router #3
eth1 => 192.168.30.0/24
tun0 => WAN VPN 10.1.30.0/24
tun1 => VPN UDP 10.1.31.0/24
tun2 => VPN TCP:433 10.1.32.0/24
tun3 => client connection to Router #1 tun0
Gateway Router #4
eth1 => 192.168.40.0/24
tun0 => WAN VPN 10.1.40.0/24
tun1 => VPN UDP 10.1.41.0/24
tun2 => VPN TPC:433 10.1.42.0/24
tun3 => client connection to Router #3 tun0
Now the above configuration works although I need to do magic with the iroute entry and tell it to just accept from 10.1.0.0/16 and 192.168.0.0/16 because there are entirely too many subnets involved to be listing individually. Also I want this network to be instantly reconfigurable. If RGW#3 went offline RGW#4 could be redirected to RGW#1/2 to reestablish connective with the rest of the network. On this same line I'd like to be able to establish multiple paths to the same destination.
Gateway Router #4 (modified)
eth1 => 192.168.40.0/24
tun0 => WAN VPN 10.1.40.0/24
tun1 => VPN UDP 10.1.41.0/24
tun2 => VPN TPC:433 10.1.42.0/24
tun3 => client connection to Router #3 tun0
tun4 => client connection to Router #1 tun0
How does OpenVPN handle this types of setups with respect to iroute and deciding to forward / drop packets? I'm can configure OSPF with preferred routes and it can easily handle the kernel routing tables for the Linux machines involved but I'm worried about OpenVPN getting confused or trying to play traffic cop. Also I want to be able to expand this setup to include dozens of RGW's in a hybrid mesh / web type configuration. Is this remotely possible or is there limitations within the software that would prevent it?
Sorry for the complicated questions and WoT, not sure how to best present this set of questions.
The general idea is,
Gateway Router #1
eth0 => Internet / untrusted network x.x.x.x
eth1 => Lan / trusted network 192.168.10.0/24
tun0 => WAN VPN connection 10.1.10.0/24
tun1 => VPN UDP client connection 10.1.11.0/24
tun2 => VPN TCP port 433 client connections (stealth) 10.1.12.0/24
Gateway Router #2
eth0 => x.x.x.x
eth1 => 192.168.20.0/24
tun0 => WAN VPN connection 10.1.20.0/24
tun1 => VPN UDP, 10.1.21.0/24
tun2 => VPN TCP:433, 10.1.22.0/24
tun3 => client connection to Router #1 tun0
Gateway Router #3
eth1 => 192.168.30.0/24
tun0 => WAN VPN 10.1.30.0/24
tun1 => VPN UDP 10.1.31.0/24
tun2 => VPN TCP:433 10.1.32.0/24
tun3 => client connection to Router #1 tun0
Gateway Router #4
eth1 => 192.168.40.0/24
tun0 => WAN VPN 10.1.40.0/24
tun1 => VPN UDP 10.1.41.0/24
tun2 => VPN TPC:433 10.1.42.0/24
tun3 => client connection to Router #3 tun0
Now the above configuration works although I need to do magic with the iroute entry and tell it to just accept from 10.1.0.0/16 and 192.168.0.0/16 because there are entirely too many subnets involved to be listing individually. Also I want this network to be instantly reconfigurable. If RGW#3 went offline RGW#4 could be redirected to RGW#1/2 to reestablish connective with the rest of the network. On this same line I'd like to be able to establish multiple paths to the same destination.
Gateway Router #4 (modified)
eth1 => 192.168.40.0/24
tun0 => WAN VPN 10.1.40.0/24
tun1 => VPN UDP 10.1.41.0/24
tun2 => VPN TPC:433 10.1.42.0/24
tun3 => client connection to Router #3 tun0
tun4 => client connection to Router #1 tun0
How does OpenVPN handle this types of setups with respect to iroute and deciding to forward / drop packets? I'm can configure OSPF with preferred routes and it can easily handle the kernel routing tables for the Linux machines involved but I'm worried about OpenVPN getting confused or trying to play traffic cop. Also I want to be able to expand this setup to include dozens of RGW's in a hybrid mesh / web type configuration. Is this remotely possible or is there limitations within the software that would prevent it?
Sorry for the complicated questions and WoT, not sure how to best present this set of questions.