Skip to content

Instantly share code, notes, and snippets.

@b-mc
Created June 16, 2021 09:17
Show Gist options
  • Save b-mc/02e005ca210b048a8da3ed01b51a0057 to your computer and use it in GitHub Desktop.
Save b-mc/02e005ca210b048a8da3ed01b51a0057 to your computer and use it in GitHub Desktop.
Dante SOCKS Server Minimal Config

Dante SOCKS Server Minimal Config

Setup

Software

  • CentOS Linux release 8.3.2011
  • Dante 1.4.3

Install

# Install the build tools
dnf install make gcc
# Download dante-1.4.3.tar.gz, extract, cd to the folder
./configure --disable-client
make
make install
# Create the service user and files
useradd -M socks -s /usr/sbin/nologin
mkdir /var/log/dante/
touch /var/log/dante/dante.log

Config file

/etc/sockd.conf

logoutput: stderr
errorlog: stderr

internal: 172.16.0.2
external: 172.16.0.2

user.unprivileged: socks

socksmethod: none
clientmethod: none

logoutput: /var/log/dante/dante.log

client pass {
    from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
    log: error connect disconnect
}

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

Verify the config

sockd -V

Systemd Unit File

The installator doesn't create a systemd unit file - you have to create it yourself.

sockd runs with no params and defaults to:

  • /etc/sockd.conf as the config file
  • /var/run/sockd.pid as the PID file

After and Wants are there to start the service after the network is fully configured.

/etc/systemd/system/dante.service

[Unit]
Description=Dante SOCKS server
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/sbin/sockd

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment