Install the dante proxy server
Install the server
Run the command
apt-get install dante-server
Check the version
danted -v
Create config file
Create run user
adduser --no-create-home --shell /usr/sbin/nologin dante
Backup the original file
mv /etc/danted.conf /etc/danted.conf.bak
Create new file
Open new file
1
nano /etc/danted.conf
With content
2.1. No authentication
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25logoutput: /var/log/socks.log
internal: eth0 port = [YOUR_PORT]
external: eth0
clientmethod: none
socksmethod: none
user.privileged: root
user.notprivileged: dante
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
socks block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}2.2. Need authentication
https://www.inet.no/dante/doc/1.4.x/config/auth_username.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26logoutput: /var/log/socks.log
internal: eth0 port = [YOUR_PORT]
external: eth0
clientmethod: none
socksmethod: username
user.privileged: root
user.notprivileged: dante
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bind connect udpassociate
log: error connect disconnect
socksmethod: username
}
socks block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}if you using this method, please create the system user, like
1
2useradd [YOUR_USERNAME] -r
passwd [YOUR_USERNAME]
Run the server
Run the command
systemctl start danted
Check the status
systemctl status danted
Verify the server
Run the command
No authentication
1
curl --socks5 IP:PORT https://ipinfo.io/ip
Need authentication
1
curl -x socks5://USERNAME:[email protected]:PORT https://ipinfo.io/ip