I want to set up an ethernet bridge on the subnet. existing DHCP.

Q: I want to set up an ethernet bridge on the subnet. How do I configure OpenVPN so that it will cooperate with the existing DHCP server on the LAN?
There are two ways to do this.
Using the server-bridge directive is the easiest. First, set aside an address pool in your subnet for use by OpenVPN clients. This range must be separate from the DHCP server range used on the subnet. Suppose you want OpenVPN to use192.168.1.200 to for allocation to connecting clients, and that the gateway for the LAN is Then the appropriateserver-bridge directive would be:
In the second method, the OpenVPN clients get their IP address lease from the DHCP server which is serving the LAN. For this configuration, you don't need a server-bridge directive, just something like:
mode server
dev tap0 # must be bridged with LAN ethernet interface
[SSL/TLS parms]
[keepalive parms]
The clients will negotiate a DHCP lease through the tunnel, meaning that both VPN clients and local machines will receive their IP addresses from the DHCP server address pool. The one complexity about this configuration is that you need to modify your DHCP server configuration to differentiate between local clients and VPN clients. The reason for this is that you must not pass out a default gateway to VPN clients. See the Win32 install notes for an example.

Return to FAQ

Last modified 3 years ago Last modified on 01/30/14 16:19:12