How Do I Set Up a SOCKS5 Proxy on Ubuntu with Dante?

Proxy servers have been there for many years and in computer networks, a proxy is a computer that is located between you and the server by acting as a gateway between a local network and a large scale network for example internet. Socks stands for Socket secure and is an internet protocol that has the function of routing packets between a server and the client by using a proxy server.

Dante is developed by Inferno Nettverk A/S which consists of a Socks server as well as a Socks client and implements RFC 1928 and related standards. Dante is used for providing secure and convenient network connectivity. Dante being an open-source Socks server is used with many popular network applications such as Bloomberg terminals, most web browsers, instant messaging programs, and many more that have Socks support built in them.

Sponsored

Now that we know what Socks and Dante are, let us take the next step of answering “how do I set up a Socks5 proxy on Ubuntu with Dante”.

Set up Socks5 proxy with Dante

Open a terminal in your Ubuntu system and follow the below steps to set up Socks5 proxy with Dante:

See also  Missed Operator Day at KubeCon NA 2023? – Catch the Replay!

Step 1: Updating Cache Repository

The first step towards setting up a Socks5 proxy on Ubuntu with Dante is to update the cache repository packages for which we will use the below command:

$ sudo apt update

How do i set up a socks5 proxy on ubuntu with dante? 1

If all the packages are up to date then you don’t need to upgrade however if they are not then run the below-mentioned command to upgrade the packages:

$ sudo apt upgrade

How do i set up a socks5 proxy on ubuntu with dante? 2

Step 2: Installing Dante

The default Ubuntu package repositories have Dante server package so we will install Dante by using the below command in our Ubuntu 20.04 terminal:

$ sudo apt install dante-server

How do i set up a socks5 proxy on ubuntu with dante? 3

Step 3: Verifying installation

To verify the installation of Dante we will execute the below command:

$ danted -v

How do i set up a socks5 proxy on ubuntu with dante? 4

Step 4: Configuring Dante

Now that we are done with installing Dante let us now configure it by first opening the danted.conf file in the nano editor for which we have to execute the below command in our Ubuntu terminal:

$ sudo nano /etc/danted.conf

When you execute the above command you will see something like the below:

How do i set up a socks5 proxy on ubuntu with dante? 5

Sponsored

Remove the settings set in the above file and paste the lines mentioned below in the file:

internal: eth0 port = 8128
external: eth0

socksmethod: username

user.unprivileged: nobody
user.privileged: root

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

socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: connect
log: error
socksmethod: username
}

How do i set up a socks5 proxy on ubuntu with dante? 6

This config will let us establish a Socks proxy which will run on port 8128 as set in the above file and will require authentication. To save the above-edited file, press CTRL+S and then CTRL+X to exit.

Step 5: Starting Danted proxy

This step involves starting danted proxy which will be achieved with the following command:

See also  ROS 2 Humble security, a tour of the new and improved features
$ service danted start

How do i set up a socks5 proxy on ubuntu with dante? 7

Step 6: Creating a user

We have successfully installed and configured Dante so let us continue to the next step where we will create a user which is an optional step but can secure access from everyone. To authenticate connecting clients Dante uses the system Unix user accounts hence we will create a new user. However, keep in mind that the password will be sent in plain text using the network when some client will request connecting to this proxy server.

$ sudo adduser exmpl

How do i set up a socks5 proxy on ubuntu with dante? 8

Conclusion

Dante consists of a Socks5 server and is used as a proxy server. You can set up a Linux server online and then use it as a proxy server for accessing other websites. These proxy servers come very handy when we need to change our IP Address or access some website from a different geo-location.

In this article, we explained and delivered every step on how to set up a Socks5 proxy on Ubuntu with Dante.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply