push "redirect-gateway"
-changes all your inet traffic to go over the vpn, trashing your existing default gateway
-adding def1 does the same, but does not trash your default gateway, so when you get off the vpn you can still use the inet.
- in 2.1 you can add bypass-dhcp to it to bypass the vpn route for dhcp server
all that is explained better in the manpages, under --redirect-gateway
(from IRC channel)
<krzie> !man
<vpnHelper> krzie: "man" is (#1)
http://openvpn.net/man for 2.0 manual, or
(#2)
http://openvpn.net/man-beta.html for 2.1 manual, or (#3) the
man pages are your friend!
if you must use 2.0.9, or your OS does not support bypass-dhcp, you can make a --up script.
If you use BSD/OSX you could use something like this:
GW=`netstat -rn|grep -v Gateway|grep G|awk '{print $2}'`
route add $DHCP_SERVER -gateway $GW
in linux you would use:
GW=`netstat -rn|grep -v Gateway|grep G|awk '{print $2}'`
route add $DHCP_SERVER gw $GW
you would need to get the DHCP_SERVER server yourself for now, because i dont have a box that uses DHCP to test on. but
http://www.cyberciti.biz/faq/linux-find-out-dhcp-server-ip-address/ would help you get started on linux,
http://www.macosxhints.com/article.php?story=20080518160815998 would help you get started on osx
Basically the goal is to add a route for DHCP_SERVER to go through your LAN gateway instead of through the vpn.