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.
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