Windows 10: Route traffic + DNS through SSH (ie.: socks proxy)

Discus and support Route traffic + DNS through SSH (ie.: socks proxy) in Windows 10 Ask Insider to solve the problem; Hi everyone, I have the following setup: 2 computers (A and B) Both computers run Windows 10 and I have admin rights Computer A is connected to 2... Discussion in 'Windows 10 Ask Insider' started by /u/Acquiesce67, Aug 2, 2020.

  1. Route traffic + DNS through SSH (ie.: socks proxy)


    Hi everyone,

    I have the following setup:

    • 2 computers (A and B)
    • Both computers run Windows 10 and I have admin rights
    • Computer A is connected to 2 VPN networks (simultaneously)
    • Computer A has got OpenSSH server installed and enabled
    • Computer B should access the internet and all private domains (coming through the VPNs) via Computer A
    • Computer B should resolve host names through Computer A
      in other words: DNS traffic should be resolved through Comp. A as well

    Currently, I achieve this by connecting to Comp.B to Comp A. via SSH which gives me a SOCKS proxy in the SSH tunnel. Computer B has got ProxyCap installed which routes all traffic (including DNS) to Comp A. and everything is good.

    This setup works pretty well for me, but there's one ugly setback: ProxyCap does change the Winsock configuration of my Windows 10 (on Computer B) which causes incompatibility problems with my other applications. When I execute `netsh winsock show catalog` it does return dozens of new entries related to ProxyCap and I don't want this (if possible)

    I would like to avoid using ProxyCap and save myself from an application messing around with such OS level socket settings, but I need all traffic (not just browser traffic) to go through Comp B.

    TL;DR: How do I route all Win10 network traffic (including DNS) thorough another Windows 10 computer (preferably over a SOCKS proxy) without using ProxyCap? Is this possible?

    submitted by /u/Acquiesce67
    [link] [comments]

    :)
     
    /u/Acquiesce67, Aug 2, 2020
    #1

  2. Virtual Network Adapter that forwards request to a SOCKS proxy

    Here is what I did to do it.

    1. Use OpenVPN tap drivers to install a virtual network adapter(use NDIS5 drivers).
    2. Name it as taplan
    3. Assign 10.0.0.1 to your network adapter named taplan. Use 255.255.255.0 as subnet mask.
    4. Have a socks server or use public server you owned to do a ssh tunnel socks proxy connection.

    If you don't have a socks proxy, you need a public server.
    You can use putty to establish an ssh connection along with a tunnel which acts as a socks proxy. Sample command is something like this:

    ssh -D 8123 -f -C -q -N socksserverip.com

    After that, you have a socks proxy on your localhost at port 8123.

    1. Check your socks proxy with Firefox by pointing localhost:8123 as socks proxy. If you have an internet connection then so far so good.
    2. Download tun2socks from prebuilt windows binaries. For this question, I used badvpn-1.999.128-win32.zip file.

    Extract bin/badvpn-tun2socks.exe file to somewhere in system PATH and rename it as t2s.

    1. Configure tun2socks to make your taplan adapter to use socks proxy.

    Enter command prompt with admin privileges and type:

    Now you have a virtual network adapter named as taplan which uses the socks proxy configured as your localhost to connect to internet. All requests forwarded to this adapter will tunnel through your public server.

    1. Configure your internet routes.

    In command prompt type:

    this will show you your current routes. The default gateway is the top one. Note that IP.

    Now all your internet traffic will be using 10.0.0.2 as gateway which is configured in a virtual network adapter.
     
    Ramazan Polat, Aug 2, 2020
    #2
  3. nkef Win User
    windows 10 1809 onedrive ignores proxy settings

    I have configured a http proxy and a socks proxy for both internet explorer proxy settings and winhttp proxy settings.

    After upgrading to Windows 10 1809 onedrive ignores the configured proxy server.

    Edge and windows update utilize the winhttp proxy settings and routes all traffic through the proxy servers properly.

    I have verified the proxy settings via netsh:

    Code:
    netsh winhttp show proxy 
    
    Current WinHTTP proxy settings:
    
        Proxy Server(s) :  http=192.168.0.10:3128;socks=192.168.0.10:1080
    
        Bypass List     :  *.local;<local>
     
    nkef, Aug 2, 2020
    #3
  4. Route traffic + DNS through SSH (ie.: socks proxy)

    Configuring socks 5 proxy in window 10

    I've to use manual socks 5 proxy but there is no specific option for socks 5 in proxy configuration setting and general socks mode option is not working for socks 5 proxy.In pic. I've shown the network settings of firefox(where socks 5 is present) and of
    windows(No specific socks 5 option and general mode is not working).


    Route traffic + DNS through SSH (ie.: socks proxy) 3982d9e7-6338-4fdd-902e-0abf94792ad2.jpg
     
    HIMANSHUBHADANI, Aug 2, 2020
    #4
Thema:

Route traffic + DNS through SSH (ie.: socks proxy)

Loading...
  1. Route traffic + DNS through SSH (ie.: socks proxy) - Similar Threads - Route traffic DNS

  2. Using SOCKS proxy with Windows app in mac for RDP session

    in Windows 10 Gaming
    Using SOCKS proxy with Windows app in mac for RDP session: Is there any update or plans for using SOCKS proxy in RDP session from Windows app in MAC? https://answers.microsoft.com/en-us/windows/forum/all/using-socks-proxy-with-windows-app-in-mac-for-rdp/e48fcac2-682d-48c2-8ad7-850635d43b11
  3. Using SOCKS proxy with Windows app in mac for RDP session

    in Windows 10 Software and Apps
    Using SOCKS proxy with Windows app in mac for RDP session: Is there any update or plans for using SOCKS proxy in RDP session from Windows app in MAC? https://answers.microsoft.com/en-us/windows/forum/all/using-socks-proxy-with-windows-app-in-mac-for-rdp/e48fcac2-682d-48c2-8ad7-850635d43b11
  4. DNS queries are being routed through IPv4 instead of DoH

    in Windows 10 Gaming
    DNS queries are being routed through IPv4 instead of DoH: Hello,I recently configured DNS over HTTPS DoH on my Windows 11 24H2. However, I noticed that all DNS queries are still being routed through IPv4 instead of DoH.Here’s the setup I’ve configured:DNS IPv4: Set to 1.1.1.1 Cloudflare.DNS over HTTPS: On manualDNS over HTTPS...
  5. DNS queries are being routed through IPv4 instead of DoH

    in Windows 10 Software and Apps
    DNS queries are being routed through IPv4 instead of DoH: Hello,I recently configured DNS over HTTPS DoH on my Windows 11 24H2. However, I noticed that all DNS queries are still being routed through IPv4 instead of DoH.Here’s the setup I’ve configured:DNS IPv4: Set to 1.1.1.1 Cloudflare.DNS over HTTPS: On manualDNS over HTTPS...
  6. I am on a Linode SSH PUTTY TUNNEL SOCKS PROXY, I can't get off it, And because of this I...

    in Windows 10 Gaming
    I am on a Linode SSH PUTTY TUNNEL SOCKS PROXY, I can't get off it, And because of this I...: I am on a Linode SSH PUTTY TUNNEL SOCKS PROXY, I can't get off it, And because of this I can't get on the Microsoft app store!This means I can not play MineCraft either nor Install HexChat or live my life!Microsoft how dare you!It's my right to be able to encrypt my...
  7. I am on a Linode SSH PUTTY TUNNEL SOCKS PROXY, I can't get off it, And because of this I...

    in Windows 10 Software and Apps
    I am on a Linode SSH PUTTY TUNNEL SOCKS PROXY, I can't get off it, And because of this I...: I am on a Linode SSH PUTTY TUNNEL SOCKS PROXY, I can't get off it, And because of this I can't get on the Microsoft app store!This means I can not play MineCraft either nor Install HexChat or live my life!Microsoft how dare you!It's my right to be able to encrypt my...
  8. How to route all Traffic through the Internal Network in Windows 11/10

    in Windows 10 News
    How to route all Traffic through the Internal Network in Windows 11/10: [ATTACH]A remote computer has two options to use the internet when it connects to an internal network, and one of them is the default gateway. If you want to prevent the remote client computer from using the internet through the default gateway and allow it to use the secure...
  9. Routing network traffic through wired Windows 10 machine

    in Windows 10 Network and Sharing
    Routing network traffic through wired Windows 10 machine: Hey all, How would I set windows up to allow other computers to use it as the default gateway? I have a VPN on the windows 10 machine that i want to be able to use on the other devices by using this windows 10 machine as the default gateway Thoughts?...
  10. Traffic routing on wired and wireless connections

    in Windows 10 Network and Sharing
    Traffic routing on wired and wireless connections: I have satellite internet service with limited data. I use wired Ethernet as the always-on connection, but for higher data or bandwidth applications, i.e. large downloads or video streaming, I connect to a cellular hotspot. Is there a way to configure my adapters or other...

Users found this page by searching for:

  1. badvpn-tun2socks.exe