I reviewed my config and did some more testing:
A manual lookup of the domain works and is answered by the DNS-Server behind the tunnel.
C:\Windows\System32>nslookup www.openvpn.net
Server: UnKnown
Address: 100.113.58.13
Nicht autorisierende Antwort:
Name: www.openvpn.net
Addresses: 198.41.191.212
198.41.184.213
C:\Windows\System32>
Next a made a wireshark capture, trying to connect to
http://www.debian.org via Firefox.
Here you can see, that both DNS servers are asked. The Client gets a response from both as well.
http://www.directupload.net/file/d/4096/mskyjcih_jpg.htm
As I searched through the capture, the client connected to "128.31.0.62", which is the IP adress the DNS server behind the tunnel replied. No connections to the other hosts.
Concerning this special situation it seems, like it worked as I expect it. :geek:
But this can be also a one-hit. In other scenarios, where both queries return the same IP, I cannot be sure, which request is processed.
I also thought about removing the dns entries on client side on the local interface, after the tunnel is up. But the local adapter gets the ip and dns via dhcp. In this case I cannot delete them (at least I don't know how).
So the questions still exists: How can I make sure, that I only use the DNS server behind the tunnel, to be safe against dns-cache poisoning in public Wireless Lans?