I've setup dnsmasq on a Linux box and setup the DNS address on another Linux by adding its IP to /etc/resolv.conf
file.
$ cat /etc/resolv.conf
nameserver 192.168.9.105
nameserver 8.8.8.8
Now I can ping to any internal ip, as follows:
$ ping cca
PING cca (192.168.9.102) 56(84) bytes of data.
64 bytes from cca-erik (192.168.9.102): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from cca-erik (192.168.9.102): icmp_seq=2 ttl=64 time=0.024 ms
^C
--- cca ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.017/0.020/0.024/0.005 ms
However, on Windows I'm having some issues. I set the nameserver as follows:
netsh interface ip set dns name="aea-tap" static 192.168.9.105
ipconfig /flushdns
nslookup seems to resolve a domain name correctly:
C:\Users\cca>nslookup cca
Server: aktos-1-vpn
Address: 192.168.9.105
Name: cca
Address: 192.168.9.102
But ping doesn't work:
C:\Users\cca>ping cca
Ping request could not find host cca. Please check the name and try again.
How can I fix this on Windows so I can ping cca
?