Creating simultaneous network connections to a VPN and local area network.
Greetings linuxquestion.org
Background:
I'm working with a Ubuntu 10.04 LTS system with two network interfaces (both Ethernet).
The Idea: I wish to setup this system such that it is simultaneously connected to my local and an OpenVPN network and able direct traffic between the connections depending on what program is sending the traffic.
The problem: Under my current OpenVPN configuration all network traffic is directed to the VPN.
My OpenVPN config file (some details omitted)
--remote [gateway ip] # vpn12 load:
--remote [gateway ip] # vpn11 load:
--remote [gateway ip] # vpn15 load:
--remote [gateway ip] # vpn16 load:
--remote [gateway ip] # vpn8 load:
--remote [gateway ip] # vpn4 load:
--remote [gateway ip] # vpn13 load:
--remote [gateway ip] # vpn10 load:
--remote [gateway ip] # vpn7 load:
--auth-nocache
--auth-user-pass [username and password file]
--client
--ca ca.crt
--cert client.crt
--key client.key
--dev tun
--nobind
--topology subnet
--ns-cert-type server
--proto udp
--port 1194
--persist-key
--persist-tun
--ping 15
--ping-restart 45
--ping-timer-rem
--tls-client
--pull
--comp-lzo
--verb 3
--script-security 2
In practice, I would like OpenVPN to operate out of one of my two network interfaces and leave the other interface connected to the local network. Then by default all network traffic should be directed to my local network unless I specify (on a per program bases) that certain traffic should go though the VPN.
These two network connections can (should) stay completely independent of each other and do not need to talk to each other.
Can anyone provide me with instruction/direction on how I can achieve such a setup?
Constructive input is appreciated,
Reactor89
|