If I don’t specify anything, OpenVPN pushes the
openvpn domain to my (Mac) client. This makes short name resolution buggy. To avoid FQDN resolution when connecting to my LAN servers, I specify the DNS domain my VPN client should be part of:
# vi /etc/openvpn/server.conf (...) push "dhcp-option DOMAIN tumfatig.net" (...)
That’s All Folks!
I use VPN to remotely connect to my home-LAN when I’m away.
I’ve tried may kinds of VPN ; from IPsec (point-to-point) to SSL through L2TP. I found that the easiest one to implement, when using various OS client, was VPN/SSL. And the easiest software to be used by any OS, or at least any I use, was OpenVPN. From Windows to OSX through NetBSD, there’s an available binary.
So let’s create the server on OpenBSD.
In my actual configuration, OpenVPN provides a remote DNS and only routes traffic to the internal LAN. Every public traffic is kept out of the VPN. Yesterday, I wanted to route every traffic through my VPN ; to masquerade my 3G IP address
The following notes will help you install and configure OpenVPN on a NetBSD server. This is how I can connect to my $HOME network from anywhere on the Internet.
Note that the install describes the “bridge” mode. This allows to get an IP address on the same LAN segment than my servers.