apt-get install gcc+ make build-essential curl autoconf automake libtool autotools-dev dpkg-dev fakeroot
apt-get install dpkg debconf debhelper lintian
wget http://www.inet.no/dante/files/dante-1.4.1.tar.gz
tar -xvf dante-1.4.1.tar.gz
cd dante-1.4.1
mkdir /home/dante
./configure --prefix=/home/dante
if u missing
PAM: Disabled, security/pam_appl.h missing
apt-get install libpam0g-dev
and rerun the configure command
Libwrap: Disabled, tcpd.h missing
apt-get install libwrap0 libwrap0-dev
and rerun the configure command
BSD Auth: Disabled, usable bsd_auth.h not found
apt-get install python-dev
and rerun the configure command
make
make install
The binary will be in /home/dante/sbin/sockd (yes it appears to be called sockd now).
/home/dante/sbin/sockd -v
Dante v1.4.1. Copyright (c) 1997 - 2014 Inferno Nettverk A/S, Norway
vi /home/dante/danted.conf
logoutput: /var/log/socks.log
internal: eth0 port = 1080
external: eth0
method: 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
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}
#dante-server configuration
Save
Launch danted. -f specifies the configuration file and -D makes it run in the background:
/home/dante/sbin/sockd -f /home/dante/danted.conf -D
Check if it is running:
netstat -tulp
To stop dante:
pkill sockd
Create user who need to login and who will not have shell access.
useradd -s /sbin/nologin phil
passwd phil
Make scripts for starting and stoping dante.
vi /home/dante/start-dante.sh
#!/bin/bash
sleep 10
/home/dante/sbin/sockd -f /home/dante/danted.conf -D
Save
chmod +x /home/dante/start-dante.sh ( to make executable )
vi /home/dante/stop-dante.sh
#!/bin/bash
/usr/bin/pkill sockd
Save
chmod +x /home/dante/stop-dante.sh ( to make executable )
Setup to run at boot
crontab -e
@reboot /home/dante/start-dante.sh > /dev/null 2>&1 ( You may have to increase the sleep time, if it does not work. )
Thanks! Koszi. Works. Mukodik.
RăspundețiȘtergere