Introduction

You may have read my post of turning a Linux machine into a SOCKS proxy with a single command. Well this is a somewhat more permanent solution but achieves the same thing but I hasten to add significantly more reliable.

Fix

This is the page that got the job done for me.

https://virmach.com/setting-socks-proxy-vps-dante/

The best way to implement is with 2 SSH sessions open to your Linux machine, one session to monitor the log file and another configuring the single config file for Dante Server.

Step by step below:

sudo apt-get install dante-server
sudo cp /etc/danted.conf /etc/danted1.conf
sudo vim /etc/danted.conf

Now the below configuration required for an unauthenticated SOCKS proxy that is controlled via an allowed access list of public IP addresses. You can use this proxy in tandem with something like SwitchyOmega for Chrome which allows seamless switching between different Proxy servers be it either internal or external.

logoutput: /var/log/sockd.log
internal: eth0 port = 1080
external: eth0
method: username none
clientmethod: none
user.notprivileged: nobody
user.libwrap: nobody
client pass {
 from: <your_public_range>/29 port 1-65535 to: 0.0.0.0/0
 log: connect disconnect error
}
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
 command: bind connect udpassociate
 log: connect error
 method: username
}
pass {
 from: 0.0.0.0/0 to: 10.0.0.0/8
 command: bindreply udpreply
 log: connect error
}
pass {
 from: <your_public_range>/29 to: 0.0.0.0/0
 protocol: tcp udp
}
block {
 from: 0.0.0.0/0 to: 0.0.0.0/0
 log: connect error
}
sudo service danted start|stop|restart

Now you can start stop the daemon with the above commands. Just take a look at the running log to see if there are any issues whilst implementing the server:

tail -f /var/logs/sockd.log
Dante Server SOCKS Proxy Setup
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.