Last active
January 5, 2021 17:22
-
-
Save a1anw2/b90de95ff201e35581cd718d5812989a to your computer and use it in GitHub Desktop.
SOCKS setup on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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