0

I have setup OpenVPN server on my Citrix XenServer with the following NIC:

  • NIC#1: Setup to connect to the Internet with a static IP.
  • NIC#2: Setup to interface with other machines connected to this network.

I can access the OpenVPN server through SSH and a web admin interface.

However I am not sure how to setup DHCP server for NIC#2 so the machines on this network would have a local IP.

Do I need to setup a separate DHCP server for this network, or OpenVPN is sufficient?

1 Answer 1

0

The following is true about OpenVPN, if you are using it in the normal "routing" mode, which you likely are:

  • OpenVPN gives clients an additional IP address "on-top-of" the IP they already have. So they will have the IP address given to them by whatever DHCP server is on the network, AND an IP address given to them by OpenVPN. Routing metrics decide what traffic goes where.
  • OpenVPN normally takes responsibility for assigning IPs to clients unless you're using it in bridge mode. It more or less usually has its own "built-in" DHCP server for the virtual network you're telling it to make.
  • You can actually configure OpenVPN to give a fixed virtual network IP per client if you are using certificates.

Really all you have to do is make sure your OpenVPN daemon is listening on 0.0.0.0 and it should accept incoming VPN setup requests from any interface, no matter what NIC it's from. Make sure the port it is listening on is accessible from the internet and your LAN.

If you already have a DHCP server pointed towards NIC#2's subnet, you don't have to change anything UNLESS the IP ranges of the subnet conflict between OpenVPN and your DHCP scopes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .