Tutorial

How to set up an SSH SOCKS proxy on Windows

On Windows, run ssh -N -D 1080 user@host in PowerShell and your PC has a SOCKS5 proxy on 127.0.0.1:1080 that sends traffic out through the SSH server. Point Firefox, Chrome or Edge at it and check the exit address.

Level
Beginner
Reading time
7 min
Applies to
Windows, OpenSSH command line
Transputty steps checked against
Transputty 0.1 (development build, not released)

Before you start

  • An SSH server you can log in to that allows TCP forwarding (the OpenSSH default)
  • A Windows 11 PC. The OpenSSH client and curl.exe are included; PuTTY is optional
  • A browser to send through the proxy: Firefox, Chrome or Edge

Short answer

To set up an SSH SOCKS proxy on Windows, open PowerShell, run ssh -N -D 1080 deploy@bastion.example.com and leave the window open. Then set your program's proxy to SOCKS5, host 127.0.0.1, port 1080, with remote DNS turned on. Test it with curl.exe --socks5-hostname 127.0.0.1:1080 https://ifconfig.me, which should print the SSH server's public IP address.

This page is the click-by-click Windows walk-through. What SOCKS5 is, socks5 versus socks5h, DNS leaks and settings for other applications are in the SSH SOCKS proxy guide; how ssh -D works is in dynamic port forwarding. Transputty, one of the three ways shown, is in development with no public build yet; see release status.

A SOCKS proxy is a general-purpose relay that browsers and other programs can be pointed at. With SSH, the relay listens on your own PC and sends each connection out through the SSH server, so sites see the server's address and names on the server's network resolve. If this is your first tunnel, do your first SSH tunnel on Windows first.

Step 1: start the proxy

Pick one of the three. All of them listen on 127.0.0.1:1080. 127.0.0.1 is the loopback address, which only programs on your own PC can reach.

OpenSSH (built into Windows 11)

Open Terminal or PowerShell and run:

ssh -N -D 1080 deploy@bastion.example.com

Log in and leave the window open. Nothing is printed after the login; that is the proxy running. -D 1080 is the SOCKS listener and -N means no remote shell. To keep the settings, add them to %USERPROFILE%\.ssh\config:

Host office-socks
    HostName bastion.example.com
    User deploy
    DynamicForward 1080

Then ssh -N office-socks starts it.

PuTTY

  1. On the Session panel, enter bastion.example.com under Host Name (or IP address).
  2. Open Connection › SSH › Tunnels.
  3. Type 1080 in Source port. Leave Destination empty.
  4. Select the Dynamic radio button and click Add. The Forwarded ports list shows D1080.
  5. Save the session on the Session panel, click Open and log in.

Transputty (in development, not yet downloadable)

These are the steps in the 0.1 development build.

  1. Press Ctrl+N for a new connection and, under Start from a preset, click SOCKS. It creates one rule named socks on 127.0.0.1:1080 (or the next free port if 1080 is taken). For an existing connection, open its editor, click Add rule and set Kind to "SOCKS (-D)"; the destination fields disappear because a SOCKS rule has no fixed destination.
  2. Fill in Host, Port and User under SSH server, choose the login under Authentication, and click Save & connect.
  3. When it is connected, the inspector shows "SOCKS5 proxy · DNS resolved on the server" for the rule. Copying the endpoint from the row (Ctrl+C) gives socks5h://127.0.0.1:1080.

Transputty's proxy is SOCKS5 only and handles CONNECT requests, which is what browsers and curl use. There is no proxy username or password to enter, and SOCKS4 clients will not work with it.

A connected SOCKS rule in the inspector (bottom right) with the line 'SOCKS5 proxy · DNS resolved on the server'. In this capture the rule is one of three on a connection and listens on port 1081. The app is connected to local test servers with fictional host names.

Step 2: check the proxy before touching a browser

In a second PowerShell window:

curl.exe --socks5-hostname 127.0.0.1:1080 https://ifconfig.me

Type curl.exe with the extension: in Windows PowerShell, plain curl is an alias for a different command. The command prints the public IP address that the request came from. Run it once more without the proxy option to compare:

curl.exe https://ifconfig.me

The first should be your SSH server's address (for example 203.0.113.10), the second your own. --socks5-hostname also makes the SSH server look up the name, so a name that exists only on the server's network works too:

curl.exe --socks5-hostname 127.0.0.1:1080 http://intranet.internal/status

Step 3: configure Firefox

Firefox has its own proxy settings, separate from Windows, which makes it the easiest browser to dedicate to the proxy.

  1. Open Settings, stay on General, scroll to Network Settings and click Settings….
  2. Select Manual proxy configuration.
  3. Leave HTTP Proxy and HTTPS Proxy empty.
  4. In SOCKS Host type 127.0.0.1 and in its Port box 1080.
  5. Select SOCKS v5.
  6. Tick Proxy DNS when using SOCKS v5. Without it, Firefox looks names up on your own network: internal names fail, and your local DNS server sees every site you visit.
  7. Click OK.

Visit a "what is my IP" site, or an internal address such as http://intranet.internal/, to confirm.

Step 4: configure Chrome or Edge

Chrome and Edge normally follow the Windows proxy settings, which are built around HTTP proxies. A command-line switch is more reliable. Start the browser with its own profile folder as well: without one, the new window joins a browser process that is already running (often in the background) and the proxy switch is silently ignored. The paths are the default install locations.

& "C:\Program Files\Google\Chrome\Application\chrome.exe" `
  --user-data-dir="$env:LOCALAPPDATA\ChromeTunnel" `
  --proxy-server="socks5://127.0.0.1:1080"
& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" `
  --user-data-dir="$env:LOCALAPPDATA\EdgeTunnel" `
  --proxy-server="socks5://127.0.0.1:1080"

The window that opens is a separate, empty profile that uses the proxy; your normal browser windows stay direct. With a socks5:// proxy, Chromium-based browsers send host names to the proxy for resolution. Confirm with a "what is my IP" site in that window.

Step 5: turn it off

  1. Undo the client setting first. In Firefox, go back to Network Settings and choose No proxy or Use system proxy settings. Close the Chrome or Edge window you started with the switch.
  2. Stop the proxy. Ctrl+C in the ssh window, close the PuTTY session, or in Transputty click Disconnect (or turn off the socks rule's switch).

If you stop the proxy but leave the browser configured, every page fails with "The proxy server is refusing connections". With ssh and PuTTY that also happens whenever the SSH connection drops. Transputty keeps the listener open while it reconnects: a request made then waits up to 10 seconds and fails if the tunnel is not back by then.

What to do when it fails

What you see Likely cause Next step
The "what is my IP" page still shows your own address in Chrome or Edge The window joined a browser that was already running, so the switch was ignored Use the --user-data-dir form in step 4
curl.exe works but Firefox cannot open internal names Proxy DNS when using SOCKS v5 is not ticked Step 3, item 6
"The proxy server is refusing connections" Nothing listens on 127.0.0.1:1080: ssh or PuTTY has exited Start the proxy again; see SSH tunnel keeps disconnecting
ssh prints open failed: administratively prohibited The server forbids forwarding (AllowTcpForwarding no or a restrictive PermitOpen) Ask the server's administrator
ssh prints a bind error for port 1080 Another program holds the port Use another port, or see local port already in use

Two cautions. Only programs you configure use the proxy, and only for TCP; everything else on the PC connects directly, so this is not a VPN. And keep the listener on loopback: -D 0.0.0.0:1080 would let anyone on your network browse through your SSH login. Transputty's editor only accepts loopback listen addresses. The SSH SOCKS proxy guide covers the other limits.

For a single fixed destination, such as one database, a local port forward is simpler than a proxy.

Common questions

How do I set up an SSH SOCKS proxy on Windows?

Open PowerShell and run ssh -N -D 1080 user@server with the OpenSSH client built into Windows 11, then leave the window open. That creates a SOCKS5 proxy on 127.0.0.1 port 1080. Point Firefox at it under Network Settings, or start Chrome or Edge with the --proxy-server switch and its own profile folder.

Why does Chrome or Edge ignore --proxy-server on Windows?

Chrome and Edge ignore the --proxy-server switch when the new window joins a browser process that is already running, which on Windows is common because both can keep running in the background. Add --user-data-dir with a separate folder so that the browser starts as its own process and profile with the proxy applied.

Why do I have to type curl.exe in PowerShell?

In Windows PowerShell 5.1, curl is an alias for the Invoke-WebRequest cmdlet, which does not understand curl options such as --socks5-hostname. Typing curl.exe runs the real curl program that ships with Windows. In PowerShell 7 the alias is gone and either spelling works.

Does Windows have a system-wide SOCKS proxy setting?

Not a dependable one. The proxy page in Windows Settings is designed for HTTP proxies, and many programs ignore a SOCKS entry made there. Configure SOCKS in each program instead: Firefox has its own setting, Chrome and Edge take a command-line switch, and curl has the -x option.

Does Transputty support SOCKS4 or a proxy password?

No. A Transputty SOCKS rule is SOCKS5 only, accepts CONNECT requests only, and the app has nothing to set a proxy username or password. Because the listener is bound to 127.0.0.1, only programs on your own PC can reach it. Transputty is in development and has no public build yet.

How this tutorial was checked

2026-11-26: The ssh -D command and the DynamicForward config entry were run on Windows 11 with the built-in client (OpenSSH_for_Windows 9.5p2), and a local web page was fetched through the proxy with curl.exe 8.22 using --socks5-hostname. The server was the Transputty project's own test SSH server on the same PC, not a real OpenSSH sshd. Not run: the ifconfig.me requests, and the Firefox, Chrome and Edge steps, which are written from each vendor's documentation. The PuTTY steps are from the PuTTY manual and were not run. The Transputty steps were written from the 0.1 source code and were not clicked through in the app.

Sources and further reading

Transputty keeps SSH tunnels running on Windows

Local, remote and SOCKS5 forwards in one window, automatic reconnection with ports that stay bound, and a clear reason when something fails. In development; no public build yet.