[Dante](https://www.inet.no/dante/) is a _mature_ and stable **SOCKS proxy** developed by **Inferno Nettverk A/S proxy**. This article helps you installing **Dante** as your _**private SOCKS proxy**_ with _username_ and _password_ (`pam`) authentication system.
## Preparing system
Before starting, there are several prerequisites that must be met to follow this article:
- Comfortable using Linux terminal.
- A Linux server with a **Debian** based distribution.
Because what we are going to create is a *private proxy* which requires _username_ and _password_ authentication from a user account on the Linux system, we need to create a Linux user on the server which will be used for the authentication process.
```shell
# Create new user
sudo useradd -r -s /bin/false myproxyuser
# set the user password
sudo passwd myproxyuser
```
> _Note: Change `myproxyuser` above with the user you want to use for authentication._
## Install Dante server
Because **Dante** is a very mature and popular **SOCKS proxy**, you can easily install Dante server with the built-in Debian or Ubuntu package manager.
```shell
sudo apt install dante-server
systemctl status danted.service
```
After the installation process is complete, the system will automatically try to run _danted.service_, but the _service_ will be failed to run because there is no authentication method that must be configured.
## Configuring Dante server
Dante configuration file are located at `/etc/danted.conf`. There is an example of a configuration along with a very complete explanation of what the parameters or configuration variables are used for in that default configuration file.
Backup the default configuration file with `sudo cp /etc/danted.conf /etc/danted.conf.bak` command, then change the configuration in `/etc/danted.conf` with the following example configuration:
```plain
# log configuration
logoutput: stderr
# danted service will listen to any available IP addresses on port 1080
internal: 0.0.0.0 port=1080
# which interface will be used for outgoing connection
external: eth0
clientmethod: none
socksmethod: username
user.privileged: root
user.unprivileged: nobody
user.libwrap: nobody
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
```
From the example configuration above, **Dante** will listen to any available IP addresses on port `1080` and all outgoing traffic will be passed through `eth0` interface.
Nov 09 16:51:01 aws-ec2 systemd[1]: Starting danted.service - SOCKS (v4 and v5) proxy daemon (danted)...
Nov 09 16:51:01 aws-ec2 systemd[1]: Started danted.service - SOCKS (v4 and v5) proxy daemon (danted).
Nov 09 16:51:02 aws-ec2 danted[935]: Nov 9 16:51:02 (1699523462.105152) danted[935]: info: Dante/server[1/1] v1.4.2 running
```
## Test your server
After all the processes above are complete, it's time to try using your **proxy server**. One of the easiest way to test is using `curl` from your local computer:
If you cannot establish a `SOCKS5` connection to your _proxy server_, make sure the _port_ used by Dante is open. Run the following `ufw` command (for Debian-based systems) to open a port from the firewall: