Installation and Configuration of Dante on Debian/Ubuntu with `apt`

Instructions for installing and configuring a Dante SOCKS5 proxy on Debian/Ubuntu on the command line.
The following instructions are for Debian and Ubuntu — for CentOS, RedHat, AWS EC2 and other Linux distributions that use yum as a package manager please follow these instructions.
If you are still looking for a server for this project, I can recommend the cx31 server for 4.51 EUR/month with 20TB traffic volume from the European provider HETZNER CLOUD.
Step 1 — Install danted
Project homepage: https://www.inet.no/dante/
Log into your Linux server and get root privileges:
sudo -i
Install with apt:
apt update
apt install dante-server
Info: After installation dante does not work yet and will throw errors — it has not been configured yet!
Verify the installation:
danted -v
Info: In Ubuntu and other distributions
dantedcan also be calledsockd.
Edit the config file with nano or vi:
nano /etc/danted.conf
or
vi /etc/danted.conf
Set the following configuration. Replace 1.2.3.4 with your client IP or use 0.0.0.0/0 as wildcard (please consider your security concept!):
logoutput: stderr
logoutput: /var/log/danted.log
internal: eth0 port = 1080
external: eth0
socksmethod: username none #rfc931
client pass {
from: 1.2.3.4/32 to: 0.0.0.0/0
log: connect disconnect error
}
socks pass {
from: 1.2.3.4/32 to: 0.0.0.0/0
log: connect disconnect error
}
Start danted:
systemctl start danted
Check the status:
systemctl status danted
If desired, enable autostart:
systemctl enable danted
You can now connect to the SOCKS5 proxy via the public server IP on port 1080.
If you have chosen a server from HETZNER CLOUD, here is a detailed step by step Dante SOCKS5 Proxy installation guide tailored to Hetzner servers.
Step 2 — Test the SOCKS5 Proxy
There are many ways to test the new SOCKS5 proxy.
Firefox: Settings → search for proxy → enter the SOCKS5 proxy address and port number. Open https://ipchicken.com and check the IP address.
Putty: Open Putty and click on Connection → Proxy → enter the SOCKS5 proxy address and port number. Open a SSH connection.
curl: This should return your public IP address:
curl -x socks5://<your_ip_server>:<your_danted_port> ifconfig.co
I appreciate constructive feedback that helps me improve the content of this article. Follow me on GitHub and LinkedIn for more updates and insights!
Image source: pixabay.com





