Skip to content

Instantly share code, notes, and snippets.

@a1anw2
Last active January 5, 2021 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a1anw2/b90de95ff201e35581cd718d5812989a to your computer and use it in GitHub Desktop.
Save a1anw2/b90de95ff201e35581cd718d5812989a to your computer and use it in GitHub Desktop.
SOCKS setup on ubuntu
## Setup SSH keygen
sudo -s
Create the key
ssh-keygen
Then we need to add this to the authorized users in the local user
cat /root/.ssh/id_rsa.pub >> /home/localuser/.ssh/authorized_keys
## Now creating a SOCKS server
/usr/bin/ssh -fND 5534 localuser@127.0.0.1
You can place this in the startup scripts
https://askubuntu.com/questions/36958/how-can-i-autostart-a-ssh-d-tunnel-at-login-for-a-socks-proxy
## Setup Chrome
Proxy SwitchyOmega plugin makes it easy to setup profiles where only certain hosts go through the SOCKS server
https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en
## Notes on SSH
Make sure /etc/ssh/ssh_config has the following settings enabled:
```
Hosts *
GatewayPorts yes
```
and in /etc/ssh/sshd_config
```
AllowTcpForwarding yes
GatewayPorts yes
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment