OpenVPN is at 2.4.7
All other network computers are varying versions of Windows.
We run two server instances on ports 1194 and 1195, the first is a full server and the second is handling connection for split tunnel use.
When clients connect remotely via OpenVPN they get full network access provided they know the IP of any given named host.
So one could ping 10.0.0.6 but not ping fileserver, where fileserver has IP 10.0.0.6.
If the same computer that fails to ping by name is connected directly to the company LAN then it can ping fileserver.
So the name resolution must be non-working over the OpenVPN tunnel and my question is how I can remedy this?
I *have* configured the dhcp-option DNS but it seems like it is not working anyway...
The company LAN runs on address range 10.0.0.x
Here are the server config files:
split tunnel server
port 1195
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/VPN.crt
key /etc/openvpn/keys/VPN.key # This file should be kept secret
dh /etc/openvpn/keys/dh2048.pem
tls-auth /etc/openvpn/keys/ta.key 0 # This file is secret
topology subnet
server 10.8.1.0 255.255.255.0 'nopool'
ifconfig-pool 10.8.1.2 10.8.1.127 255.255.255.0
client-config-dir /etc/openvpn/ccdl
ifconfig-pool-persist ipp2.txt
push "route 10.0.0.0 255.255.255.0"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
max-clients 20
persist-key
persist-tun
status /etc/openvpn/log/openvpn-status2.log
log /etc/openvpn/log/openvpn2.log
verb 4
explicit-exit-notify 1
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/VPN.crt
key /etc/openvpn/keys/VPN.key # This file should be kept secret
dh /etc/openvpn/keys/dh2048.pem
tls-auth /etc/openvpn/keys/ta.key 0 # This file is secret
topology subnet
server 10.8.1.0 255.255.255.0 'nopool'
ifconfig-pool 10.8.1.2 10.8.1.127 255.255.255.0
client-config-dir /etc/openvpn/ccdl
ifconfig-pool-persist ipp2.txt
push "route 10.0.0.0 255.255.255.0"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
max-clients 20
persist-key
persist-tun
status /etc/openvpn/log/openvpn-status2.log
log /etc/openvpn/log/openvpn2.log
verb 4
explicit-exit-notify 1
full server
port 1194
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/VPN.crt
key /etc/openvpn/keys/VPN.key # This file should be kept secret
dh /etc/openvpn/keys/dh2048.pem
tls-auth /etc/openvpn/keys/ta.key 0 # This file is secret
topology subnet
server 10.8.0.0 255.255.255.0 'nopool'
ifconfig-pool 10.8.0.2 10.8.0.127 255.255.255.0
client-config-dir /etc/openvpn/ccdw
ifconfig-pool-persist ipp.txt
push "route 10.0.0.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.0.3"
push "dhcp-option DNS 10.0.0.7"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
max-clients 20
persist-key
persist-tun
status /etc/openvpn/log/openvpn-status.log
log /etc/openvpn/log/openvpn.log
verb 4
explicit-exit-notify 1
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/VPN.crt
key /etc/openvpn/keys/VPN.key # This file should be kept secret
dh /etc/openvpn/keys/dh2048.pem
tls-auth /etc/openvpn/keys/ta.key 0 # This file is secret
topology subnet
server 10.8.0.0 255.255.255.0 'nopool'
ifconfig-pool 10.8.0.2 10.8.0.127 255.255.255.0
client-config-dir /etc/openvpn/ccdw
ifconfig-pool-persist ipp.txt
push "route 10.0.0.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.0.3"
push "dhcp-option DNS 10.0.0.7"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
max-clients 20
persist-key
persist-tun
status /etc/openvpn/log/openvpn-status.log
log /etc/openvpn/log/openvpn.log
verb 4
explicit-exit-notify 1
Clients are given OVPN files with the following content (plus their certificates):
client-full
client
dev tun
proto udp
remote vpn.xxxxxx.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
auth-nocache
mute-replay-warnings
remote-cert-tls server
key-direction 1
cipher AES-256-CBC
comp-lzo
verb 1
mute 20
dev tun
proto udp
remote vpn.xxxxxx.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
auth-nocache
mute-replay-warnings
remote-cert-tls server
key-direction 1
cipher AES-256-CBC
comp-lzo
verb 1
mute 20
Switching remote to port 1195 makes the client use the split tunnel approach.
EDIT:
I have this problem myself but I have solved it by editing the Windows hosts file and added all of the servers in the office I need to connect to with the proper IP address. Then I can communicate just fine with the computers on the network.
But it is a bit of pain to have to tell the other users to edit their hosts file in a similar manner to get VPN working properly for them.
I live about 5000 km from the office so my only connection is by way of OpenVPN. The other employees only occationally need the VPN but then they fall flat on the connectivity issue with DNS.