Using dyndns
Sometimes an OpenVPN server needs to be set up using a dynamic IP address. This means that OpenVPN clients need to connect to a different IP address every time the server's IP address changes. This can happen often when the OpenVPN server is hooked up to the Internet via an ADSL or cable modem connection. In this recipe, we will see how to configure a dynamic DNS name for the OpenVPN server and how the client can be configured to make use of the dynamic DNS name. As a dynamic DNS provider, the free dyndns.org service is used.
Getting ready
For this recipe, the server computer was running CentOS 5 Linux and OpenVPN 2.1.3. The client computer was running Windows XP SP3 and OpenVPN 2.1.1. Keep the configuration file, basic-udp-server.conf
, from the Chapter 2 recipe Server-side routing at hand, as well as the client configuration file, basic-udp-client.ovpn
, from the Chapter 2 recipe Using an 'ifconfig-pool' block.
How to do it...
Register an account with a dynamic DNS service provider...