Assigning DNS Suffix via DHCP and OpenVPN



  • Is there any way to configure the DHCP Server to assign a DNS search path to clients? I cannot find this or a way to insert custom options. The domain of pfSense can be assigned, so I thought there might be some way to pass that along to clients.

    Tristan Olive



  • Out of the plethora of standard DHCP options this surprisingly isn't one of them.



  • Oddly enough this may be another OpenVPN issue. I disabled the DHCP Server on the OpenVPN interface (an option that I'm not even sure should exist, as it is addressed somewhat redundantly in VPN configuration) and now I seem to be getting the domain of pfSense passed through DHCP on the LAN interface as the DNS search path.

    The search path isn't passed through to VPN clients either way, however.



  • While on the subject of OpenVPN, here are some tips for specifiying DHCP information to send to clients:

    The OpenVPN man page at http://openvpn.net/man.html details a number of options that can be set using the "Custom options" field in the pfSense OpenVPN Server configuration page.

    • push "dhcp-option DNS [ip-address]" - replace [ip-address] with the address of your DNS server. I needed this to resolve any names on the remote network.

    • push "dhcp-option DOMAIN [domain-name]" - replace [domain-name] with the desired DNS Search Path. This was required unless you want to type in the full address, with domain, in order to access remote machines.

    • push "route [network] [netmask] [gateway] [metric]" - specify the [network] that should be available to VPN clients, including, if necessary, the [netmask], [gateway], and [metric] information required.

    This was enough for my concept, maybe it will be of some use to someone else.  ;D



  • now these openvpn-options can be set up without using the custom parameters


Log in to reply