Updated: 02 October 2022
Start Chrome browser with a proxy socks5 server
google-chrome --proxy-server="socks5://127.0.0.1:1337"
Freelance software engineer United Kingdom
Updated: 02 October 2022
Start Chrome browser with a proxy socks5 server
google-chrome --proxy-server="socks5://127.0.0.1:1337"
Updated: 12 September 2022
ssh -D 8123 -f -C -q -N user@example.com -D: Tells SSH that we want a SOCKS tunnel on the specified port number -f: Forks the process to the background -C: Compresses the data before sending it -q: Uses quiet mode -N: Tells SSH that no command will be sent once the tunnel is up
Verify that the tunnel is up and running:
ps aux | grep ssh
If using -f close the tunnel
kill <process id>
Updated: 22 May 2023
The following bash script will open a socks tunnel ti a remote host and use mysqldump locally to backup a mysql database.
#!/bin/sh
DT=$(date '+%Y-%m-%dT%H:%M:%S')
SUFFIX=
FILENAME=$DT$SUFFIX
BACKUPSPATH=
USER=
IP=
PORT=
DBUSER=
DBPASS=
DBNAME=
echo "Opening socks tunnel to $IP"
echo "Writing $FILENAME"
ssh -f -L $PORT:127.0.0.1:$PORT $USER@$IP sleep 10; \
mysqldump -u $DBUSER -h 127.0.0.1 -p$DBPASS -P $PORT --routines $DBNAME > $BACKUPSPATH/$FILENAME