I've set up a caching DNS on my OVPN host with dnsmasq which uses the Google DNS servers as nameservers in a separate resolv file and it redirects requests to *.ho.me domains to my home routers DNS which is also connected to my OVPN host, so I can access my home devices via their hostnames.
My server config:
Code: Select all
local xxx.xxx.xxx.xxx
port 995
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.0.0 255.255.255.0" # <- my home network
client-config-dir /etc/openvpn/ccd
route 192.168.0.0 255.255.255.0 # <- my home network
route 10.9.0.0 255.255.255.252
push "dhcp-option DNS 10.8.0.1" # <- the ovpn host with dnsmasq
push "dhcp-option DNS 10.9.0.1" # <- my home router as secondary dns, though it's pretty much pointless and redundant I know
client-to-client
keepalive 10 120
cipher AES-256-CBC
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
verb 4
Code: Select all
iroute 192.168.0.0 255.255.255.0
ifconfig-push 10.9.0.1 10.9.0.2
Code: Select all
push "redirect-gateway"
Code: Select all
client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 995
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert extcli.crt
key extcli.key
cipher AES-256-CBC
auth SHA1
comp-lzo
verb 3
The output of ipconfig /all from my external client:
Code: Select all
Ethernet-Adapter LAN-Verbindung:
Verbindungsspezifisches DNS-Suffix:
Beschreibung. . . . . . . . . . . : TAP-Windows Adapter V9
Physikalische Adresse . . . . . . : xx-xx-xx-xx-xx-xx
DHCP aktiviert. . . . . . . . . . : Ja
Autokonfiguration aktiviert . . . : Ja
Verbindungslokale IPv6-Adresse . : xxxx::xxxx:xxxx:xxxx:xxxx%21(Bevorzugt)
IPv4-Adresse . . . . . . . . . . : 10.8.0.6(Bevorzugt)
Subnetzmaske . . . . . . . . . . : 255.255.255.252
Lease erhalten. . . . . . . . . . : Mittwoch, 2. März 2016 14:46:01
Lease läuft ab. . . . . . . . . . : Donnerstag, 2. März 2017 14:47:47
Standardgateway . . . . . . . . . : 10.8.0.5
DHCP-Server . . . . . . . . . . . : 10.8.0.5
DHCPv6-IAID . . . . . . . . . . . : 352387004
DHCPv6-Client-DUID. . . . . . . . : xx-xx-xx-xx-xx-xx-xx-xx-xx-xx
DNS-Server . . . . . . . . . . . : 10.8.0.1
10.9.0.1
NetBIOS über TCP/IP . . . . . . . : Aktiviert
So why does Windows say that my TAP Adapter has no Internet Access?
Is anything wrong with my configs? My external client sits behind a proxy FYI