DHCP, DNS not configured on client

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
Mr5o1
OpenVpn Newbie
Posts: 2
Joined: Thu Apr 12, 2018 1:56 am

DHCP, DNS not configured on client

Post by Mr5o1 » Thu Apr 12, 2018 2:02 am

Hi All, I’m an amateur but doing my best to understand a little about network configuration, I really appreciate you taking the time to read through this.

I’m trying to configure openvpn-as to allow clients to access both the public internet, and LAN hosts (same net as vpn server). There’s a few complicating factors:
  • I’m using a docker-compose structure with a custom network
    The openvpn-as implementation I’m using is linuxserver/openvpn-as. My question may well be better directed to the maintainers of that repo, but I thought I should confirm expected behaviour here first.
    I’d like clients to be able to access LAN hosts via domain names rather than merely IP Addresses.
Presently, everything works except for DNS.

The remote host has several docker containers on a bridge network. One container is openvpn-as, and another is running dnsmasq. From the client, I can ping the docker ip dnsmasq is running on, so routing is fine. Also from the client, if I `dig @<dnsmasqip> <desired domain>` I can see the dns record I’ve configured in the dnsmasq container.

So the problem appears to be, that the DHCP handshake isn’t configured correctly on either openvpn-as, or my client.

In the openvpn-as web-ui under network settings I've configured the correct ip pool, and under vpn settings I've specified the dnsmasq dns server. I’ve confirmed that the user settings don’t specify a static ip.

In the client openvpn output, I can’t see anything regarding DNS at all. `ip address` doesn’t show any dns information for tun0 either, only a gateway.

The relevant client openvpn output is:

Code: Select all

Thu Apr 12 06:29:45 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Apr 12 06:29:45 2018 /sbin/ip link set dev tun0 up mtu 1500
Thu Apr 12 06:29:45 2018 /sbin/ip addr add dev tun0 172.27.234.5/24 broadcast 172.27.234.255
Thu Apr 12 06:29:50 2018 ROUTE remote_host is NOT LOCAL
So to put it succinctly, is there something I need to do to allow clients to configure DNS according to the openvpn-as webui settings ?

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: DHCP, DNS not configured on client

Post by novaflash » Thu Apr 12, 2018 2:12 pm

If you use Linux as a client, then yes, something extra needs to be done.
https://docs.openvpn.net/connecting/con ... LI_program
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

Mr5o1
OpenVpn Newbie
Posts: 2
Joined: Thu Apr 12, 2018 1:56 am

Re: DHCP, DNS not configured on client

Post by Mr5o1 » Thu Apr 12, 2018 9:17 pm

Thanks very much. I figured this out while waiting for this topic to be approved. It's all working as expected now :)

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: DHCP, DNS not configured on client

Post by novaflash » Thu Apr 12, 2018 9:51 pm

Oh good. We should slow down approvals then!
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

Post Reply