Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


sockproxy is a simple script to run a SOCKS proxy on your own server. It is merely a wrapper script to orchestrate ssh and iptables properly to make it easier in everyday use.

What is socksproxy?

Much like a regular HTTP(S) proxy, a SOCKS proxy can be used to redirect/tunnel traffic through a certain server. This is useful if you want to circumvent country or content-based Internet filtering or access blocked content, e.g., by governments, workplaces, schools, and country-specific web services. Unlike HTTP(S) proxies, however, SOCKS operates on a lower level and can hence also used for other protocols (e.g. FTP, SMTP, ..).

Without socksproxy, the Internet is potentially blocked/filtered by the ISP:

Without socksproxy

With socksproxy (running on a machine without filtered access), all traffic is tunneled to through socksproxy and filters are circumvented:

With socksproxy


Dependencies are openssh-server and iptables, so be sure to have those installed.

Debian-based systems:

  1. Either download a .deb-file from the release page
  2. Or: Add my Debian/APT archive:
wget -qO - | sudo apt-key add -
sudo sh -c "echo deb release main > /etc/apt/sources.list.d/"
sudo apt-get update
sudo apt-get install socksproxy

Other Linux systems: Manually install it like this:

$ sudo make install
$ sudo make uninstall # To remove


Edit the config file at /etc/socksproxy.conf and add the allowed IP addresses and (if you like) the port on which the proxy should run on:

# Sets the port on which the proxy can be accessed on.

# Defines the IP addresses allowed to use the proxy. 

Then start the SOCKS proxy by running:

$ socksproxy start
Starting socksproxy on port 1080 ... Started with PID 15761.

You can now add it to your browser / operating system config and you are ready to surf via your proxy host!


To build the .deb archive yourself, run the following commands:

$ sudo apt-get install devscripts  # for 'debuild'
$ make clean deb
$ sudo dpkg -i build/*.deb


Simple SOCKS proxy via SSH and iptables



No packages published