SSH Security – Can a Router Eavesdrop on SSH Tunnel

man-in-the-middlessh

So I'm on a public WiFi network that blocks websites like YouTube in order to conserve bandwidth. I'm assuming the router is monitoring all traffic and rejecting all requests sent to the sites on its blacklist. In order to get around this, I tried using an SSH tunnel so that I'd have an encrypted connection with my remote server and the web requests would be made from the remote server. So the router I'm connected to shouldn't have any idea what the packets I'm sending are.

I've tried this method before on other networks that filtered traffic to sites like YouTube and it has worked perfectly. somehow this router is still able to block the websites. I've checked to make sure that my traffic is really going through the remote server by verifying the IP address, so I know I didn't just mess up the settings or forget to point my browser to the correct port. I've tried routing the traffic through two separate servers, one that uses password authentication and another that only uses keys, and the traffic is filtered in both cases.

If the packets I'm sending to and from the remote server are encrypted, how can the router know that I'm trying to access YouTube? Is the router doing a man in the middle attack on me? I checked the server's fingerprint and it was the same as usual, but maybe the router can spoof the fingerprint?

I just want to understand how the router is doing this.

Best Answer

Just like @user2675345 is saying, you should probably check the DNS proxy settings if your browser has any.

Follow these steps to enable DNS lookups through a proxy in Firefox:

  1. enter about:config in the address bar
  2. search for proxy
  3. set network.proxy.socks_remote_dns to true

I used to be a Chrome user myself, but switched to Firefox when I noticed that the DNS lookups didn't use the proxy settings. That was a while ago and should be fixed now according to this bug report.

Related Question