2

This is a development on this question.

enter image description here

I have managed to proxy HTTP and HTTPS requests as instructed above, but local name resolution fails. For example, nslookup would not be able to resolve a hostname to an IP address.

How can I tunnel DNS queries on Host B through the Host A?

Thank you!

Tony Sepia
  • 135
  • 6
  • SSH tunnels are mostly intended for TCP traffic. DNS queries are mostly UDP. You can't (easily) tunnel UDP across TCP. (I think you are fast heading towards needing a VPN rather than an SSH tunnel.) – roaima Jul 17 '22 at 22:07
  • 1
    You gave me an idea! The following question suggests that DNS should work over TCP ( https://serverfault.com/questions/181956/is-it-true-that-a-nameserver-have-to-answer-queries-over-tcp ) and I could do the following: specify localhost as a DNS server for Host B. Then tunnell all traffic from port 53 to Host A. Then forward all 53 from Host A to a normal DNS server – Tony Sepia Jul 17 '22 at 23:31

0 Answers0