0

I configured squid proxy with anonimizer on a remote server but it seems that the DNS lookup happens before a request is sent to a website over proxy. I am using windows 10 as home system and a squid proxy on a remote centos7. Did I forget some settings to do DNS lookups on the proxy serer?

The same thing happened when I ssh tunneled into the server with squid turned off and local network configured to use the tunnel.

VNP service providers and some proxy providers appear to not have this issue. How are they configuring DNS lookups to go from their remote servers and not from my local machine?

Image: proxy DNS when using SOCKS v5 In firefox, if I check the box in front Proxy DNS when using SOCKS v5, a site like https://ipleak.net/#dnsleak suddenly starts showing DNS servers belonging to hosting provider where the SSH tunneling is connected to. Which is what I wanted to do. How do I do this globally for whole OS or am I forced to use firefox?

Launching chrome from cmd like this: chrome --proxy-server="socks5://localhost:8181" did launch it but it did not tunnel neither http requests or DNS lookups .

1 Answer 1

0

A partial answer (as no one else has) -

VPNs operate at a different level in the stack to proxy servers - they operate at a packet level, where proxy servers act at a protocol level.

Broadly speaking -When opening a web page 2 steps are involved:

  1. A DNS lookup is performed to convert the domain to an IP address.

  2. A (usually tcp) request is made to that IP which asks for the page. This request again includes the domain name because this is required in the typucal case where 1 IP hosts multiple websites.

When you use a VPN for privacy the DNS queries should be routed through the VPN to a DNS server not associated with your ISP - a vpn usually acts like a virtual new connection which sits on top of, and hides the underlying one.

Its relevant that when using a VPN, DNS requests are still made to the OS, which uses a different path to a nameserver to resolve them.

There are different ways of proxying, and that can impact how DNS is done. In some cases the web browser just opens a connection to the proxy. The proxy server then takes the domain specified in the header and retrieves the page. In this case the proxy server handles the DNS.

In the case of transparent proxying - where the requests are intercepted and redirected, the IS still does the initial lookup because it has no knowledge of the proxy.

The easiest way to fix this would be to run a DNS server on the remote and cinfigure your IS to use it. This creates potential issues with others abusing your DNS, which may be solved using a VPN or limiting by IP address if its an option.

3
  • Thank you for replying. I am still pretty confused about it all, seems a bit like wild west. Mozilla allows me to proxy DNS lookups, didn't find a way to do it with chrome on windows. But on Mac, both worked. Different DNS leak tools reported my real ISP DNS server at default windows configuration, but on Mac the DNS lookups went through proxy successfully if proxy was set at a system level (even in Chrome) or with a launch parameter.
    – miran80
    Commented May 11, 2019 at 23:26
  • Do DNS servers share with each other who requested the lookup? How is a leak test site getting my local DNS IP information? It can't be resolved from my IP that sent the final request since that was proxy and there is no header that I know of that includes this. Here is one of many examples: f-secure.com/en/web/home_global/router-checker but to replicate it you need windows and a bare-bone server to ssh into and set socks5.
    – miran80
    Commented May 11, 2019 at 23:28
  • To the best of my knowledge DNS servers don't share who requested the lookup. A possible endrun would be to set up an authorative DNS server to answer a wildcard domain, then get the client to make a request to somethinguniquethatIknow.wildcard.domain - which will then allow my authorative server to know both the IP address of the requesting DNS server and who originally sent the address. I'd then tie the this information into the web server and I have uniquely identified the the DNS servers of the person checking their privacy.
    – davidgo
    Commented May 11, 2019 at 23:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .