I installed danted on ubuntu 22.04.1 with apt package manager and everything worked find 'till I tried to connect to it.
this my /etc/danted.conf
logoutput: /var/log/socks.log
internal: ens160 port = 110
external: ens160
clientmethod: none
socksmethod: username
user.privileged: root
user.notprivileged: nobody
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
}
and this is systemctl status danted.service
output:
● danted.service - SOCKS (v4 and v5) proxy daemon (danted)
Loaded: loaded (/lib/systemd/system/danted.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-09-28 10:08:31 +0330; 5min ago
Docs: man:danted(8)
man:danted.conf(5)
Process: 7117 ExecStartPre=/bin/sh -c uid=`sed -n -e "s/[[:space:]]//g" -e "s/#.*//" -e "/^user\.privileged/{s/[^:]*://p;q;}" /etc/danted.conf`; if [ -n "$uid" ]; then touch /var/run/danted.pid; chown $uid /var/run/danted.pid; fi (code=exited, status=0/SUCCESS)
Main PID: 7121 (danted)
Tasks: 20 (limit: 1030)
Memory: 7.3M
CPU: 647ms
⠇
netstat -tulp
output:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN 838/systemd-resolve
tcp 0 0 static.<server-ip backward without the first three digits>:pop3 0.0.0.0:* LISTEN 7121/danted
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 1034/sshd: /usr/sbi
tcp6 0 0 ubuntu20:pop3 [::]:* LISTEN 7121/danted
tcp6 0 0 [::]:ssh [::]:* LISTEN 1034/sshd: /usr/sbi
udp 0 0 localhost:domain 0.0.0.0:* 838/systemd-resolve
udp 0 0 localhost:snmp 0.0.0.0:* 847/snmpd
udp6 0 0 ip6-localhost:snmp [::]:* 847/snmpd
but when I try running curl curl -x socks5://danteduser:<user pass>@<my server ip address>:110 google.com
, I get this:
curl: (97) Unable to receive initial SOCKS5 response.
journalctl -l | grep danted
outoput (for last systemctl restart danted
):
Sep 28 10:08:31 ubuntu20 systemd[1]: Stopping SOCKS (v4 and v5) proxy daemon (danted)...
Sep 28 10:08:31 ubuntu20 systemd[1]: danted.service: Deactivated successfully.
Sep 28 10:08:31 ubuntu20 systemd[1]: Stopped SOCKS (v4 and v5) proxy daemon (danted).
Sep 28 10:08:31 ubuntu20 systemd[1]: Starting SOCKS (v4 and v5) proxy daemon (danted)...
Sep 28 10:08:31 ubuntu20 systemd[1]: Started SOCKS (v4 and v5) proxy daemon (danted).
Apparently port 110 is not even open, When I try telnet <server ip> 110
on my local machine, I get this:
Trying <server ip>...
telnet: Unable to connect to remote host: No route to host
This is /var/log/socks.log
file content after starting the service:
Sep 28 11:58:44 (1664353724.536076) danted[8351]: info: Dante/server[1/1] v1.4.2 running
no new log in this file after sending curl request!