Wilbert's website at SocSci

> Computer> Proxy

computer/proxy.html 2021-05-19


If you want to have control over what network traffic is directed to the campus and what not, you probably cannot use the surf eduvpn solution. Use SOCKS5 instead. It is safer, more privacy friendly and better documented.

Making a proxy

First make the proxy:

# inward ssh tunnel (if you have access to one)
ssh -N -D 8080 ssh_server_ip
# alternative reverse tunnel
# todo: lookup the syntax

Using the proxy with firefox

Then tell programs to use this proxy, for instance firefox:

or probably better write a pcap file containing:

function FindProxyForURL(url, host){
	if(dnsDomainIs(host, "ru.nl"))
		return "SOCKS5"

Keeping the proxy up and starting it when the computer starts

make a file called /etc/systemd/system/sshtunnel.service containing the following (replacing ssh_server_ip and local_user_name)

Description=SSH Tunnel

ExecStart=/bin/ssh -NT -o ServerAliveInterval=60 -D 8080 ssh_server_ip


and enable it for each time the computer starts:

systemctl enable sshtunnel