dante not starting during server reboot

I installed dante (v1.4.2) using apt-get install dante-server on ubuntu 18.04 and have following configuration:

/etc/danted.conf

logoutput: /var/log/sockd.log

internal: eno1 port = 1080
external: eno1
external.rotation: same-same

socksmethod: username

user.privileged: root
user.unprivileged: nobody

client pass {
    from: 0.0.0.0/0 to: 0.0.0.0/0
    log: connect disconnect error
}

socks pass {
    from: 0.0.0.0/0 to: 0.0.0.0/0
    log: connect disconnect error
}

When I run service danted start or service danted restart the service starts without any issue and the socks proxy works when using via my client.

But when I restart my server, the service fails to start with following status when running service danted status

danted status screenshot


Solution 1:

I had the same issue and came across your question. I fixed it by adding a systemd dependency of network-online.target to the danted.service, based on reading this https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

Here's how:

sudo systemctl edit danted.service

add this:

    [Unit]
    After=network-online.target
    Wants=network-online.target

save & exit, run this for good measure

sudo systemctl daemon-reload
sudo systemctl enable danted.service