Dante SOCKS5 Proxy Server Setup


Dante SOCKS5 Proxy Server Setup

Introduction

Dante Socks Proxy Server is developed by Inferno Nettverk A/S, and it consists of a SOCKS server and a SOCKS client, implementing RFC 1928 and other related standards. Usefull server when you need a quick proxy setup, unfortunatelly, it’s relatively limited when it comes to customization. If you want more control, you’ll need to purchase additional modules for e.g. Bandwidth control, LDAP, Redirect, etc.

Dante SOCKS5 Proxy Encapsulation

Dante SOCKS5 Proxy Server Setup

First, install some basic requirements.

RedHad/CentOS:

$ yum install gcc make

Debian/Ubuntu:

$ apt-get install gcc make

Continuing with Dante Socks Server setup from source:

$ wget https://www.inet.no/dante/files/dante-1.4.1.tar.gz
$ tar -xvf dante-1.4.1.tar.gz
$ cd dante-1.4.1
$ mkdir /home/dante
$ ./configure
$ make
$ make install
$ sockd –v

Sockd (Dante server), by default looks for /etc/sockd.conf. If you want to specify config file path, use -f. Don’t forget to add a system user. To start:

$ sockd -f /etc/sockd.conf -D
or
$ nohup sockd -f /etc/sockd.conf >/dev/null 2>&1 &

Kill sockd:

$ killall -9 sockd

Config sample:

logoutput: /var/log/sockd
errorlog: /var/log/sockd_error
socksmethod: username none
external.rotation: same-same
internal: eth0 port = 60000
external: eth0
####################################
internal: eth0:0 port = 60000
internal: eth0:1 port = 60000
...
internal: eth0:254 port = 60000
internal: eth0:255 port = 60000
####################################
external: eth0:0
external: eth0:1
external: eth0:2
external: eth0:3
...
external: eth0:254
external: eth0:255
####################################
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
socksmethod: username
protocol: tcp udp
}

Adjust rc.local if you want Dante up and running on reboot:

ifconfig eth0:0 xxx.xxx.xxx.xxx netmask 255.255.255.255
ifconfig eth0:1 xxx.xxx.xxx.xxx netmask 255.255.255.255
...
########
/usr/local/sbin/sockd -f /etc/sockd.conf &
########

Sometimes IPv6 cause problems, so consider disabling it:

$ sysctl -w net.ipv6.conf.default.disable_ipv6=1
$ sysctl -w net.ipv6.conf.all.disable_ipv6=1

Conclusion

It’s relatively easy to setup this server, and it comes as very usefull in situations where you need a quick proxy setup, but not too much customizations. It’s relatively limited when it comes to control and adjustments, so if you don’t need those, Dante is probably ideal for you. It’s pretty stable, runing for months/years without noticable issues. 

Documentation Box
Download Box