My goal is to forward DNS requests for certain work-related hosts to a jump server, which is able to resolve those requests.
I mapped port
53 on the jump server with
5353 locally as following:
ssh -L 5353:localhost:53 pritzl@jump
In this session, I am able to
nslookup server.work. Now I want to be able to do the same on my machine at home.
/etc/NetworkManager/dnsmasq.d/dnsmasq.conf as following:
Then, I restarted network manager:
service network-manager restart.
Now, let's test:
google.com, I get:
pritzl@pritzl-vault:~$ nslookup google.com Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer: Name: google.com Address: 188.8.131.52
server.work, I get:
pritzl@pritzl-vault:~$ nslookup server.work ;; connection timed out; no servers could be reached
server-2.work, I immediately get:
pritzl@pritzl-vault:~$ nslookup server-2.work Server: 127.0.1.1 Address: 127.0.1.1#53 ** server can't find server-2.work: NXDOMAIN
(Regarding the latter, I guess this makes sense, as my ISP's DNS doesn't know
server-2.work, and can response immediately. I guess I should alter my
dnsmasq.conf to include everything from
*.work, but it's a good test here to be restrictive.)
Something is wrong, but I don't know what. How do I continue with this?
I also tried setting
dnsmsaq.conf, and then
nslookup google.com doesn't work anymore (besides the conclusion that nothing works, just not only work-related hosts). I am not sure what this means exactly, but I thought it was an interesting test to add here.