Install Dante Socks Proxy Centos 7

Updated: 2019/October/29 – Fixed bad installation directory in Sockd for RPM package

  • I need a socks 5 proxy server that can run on centos. This would use a block of IP's so that client X with IP Address zzz connects tomy proxy server with ip xxx and then to remote host with ip yyy.
  • Jun 11, 2020 In this article, we will show you how to enable proxy settings for yum command on CentOS 7. Yum is a package manager tool that works with RPM packages.It is available on RedHat Enterprise Linux, CentOS, and older versions of Fedora, and it is the most convenient way to handle OS packages and its dependencies on these operating systems.

Set up MIT Kerberos and Dante on CentOS 7; Set up the native Kerberos client and ProxyCap on Windows 7: Set up MIT Kerberos and Dante on CentOS 7: Start the CentOS 7 VM. Install MIT Kerberos: root@localhost # yum install krb5-server krb5-libs krb5-workstation The version of MIT Kerberos in this sample is 1.15.1-37.

Installing socks proxy is usually not very good documented. There are only a few materials on internet and most of it won’t simply work, so here is mine.

First thing we should go through is why do we need a socks proxy? Sometimes it happens that we have a server (for example in DMZ) which has many connections and provide connectivity for ssh or other services which won’t be able to go through HTTP proxy.

So here is a short tutorial:

1. Download and install package

Note

I know that a security and trust concerns are on place whenever you download some package from internet. This is a reason why I provide source code of RPM package so you can compile it yourself.

This is not some anonymous site. You can find more information about me or contact me directly on my e-mail martin (at) enigma14 (dot) eu in case you have some questions.

In case you do not want to use some package from internet you can easily follow to manual installation and compilation steps which are also described on this page.

2. Edit config file

3. Start service

start the service and you are done.

1. Download and compile dante socks proxy

From website https://www.inet.no/dante/download.html download source code, compile it and configure, e.g.

2. Create a config file

Documentation to dante is not really clear but you have to bear in mind one thing. You are not only allowing access to socks proxy, but you also need to allow access from socks proxy to outside world. So you basically need two access lists. My example is below.

3. How to use it as service

Last thing is pretty easy, mostly if you use systemd.

Just start the service and you are done.

The following post describes how to set up dante-server (danted / sockd), a SOCKS5 proxy server, with user/password authentication. It should work on Debian and Ubuntu.

On Ubuntu 14.04 You will have to compile dante yourself. Maybe other Ubuntu versions as well. Click here for the Ubuntu 14.04 how-to.

– it lets anyone (as in any IP address) connect
– it requires user and password of a systemuser (e.g. root)

Here is how I did it on Linux Debian 6 (Squeeze) minimal x86, at first I will explain it without authentication and then tell you what to modify to add authentication:

.. to update your system and to install the text editor nano.
Then install dante-server:

It will output an error message in the end:

So let’s configure it. The configuration file is at:

Rename it and make a new one:

Now copy this and insert it into PuTTY with a right click:

Now you have to change the following lines depending on your system.

venet0:0 is the network adapter/interface which can be (and very likely is) different on your system.
To check the name use the command:

Which will output the names. In my opinion it should have been venet0 for me, but it didn’t work so just try all of them if the proxy server refuses connection.
Another very typical name would be eth0.

The IP address needs to be changed to the EXTERNAL IP of your server (the one you could also access an apache web server with from your computer):

To save with the nano editor hold CTRL+X and confirm the changes with “y”.

Now make sure dante-server is stopped and start it again:

Try to connect with your browser. We haven’t set an authentication yet so a web browser is an easy way to check if it is working. If it says “connection refused” you entered wrong information in the config file.

If it opens the website you are trying to access, congrats! 😛 Now let’s implement authentication which is really easy. Simply change the following line:

to

Now you should be able to identify yourself with the user specified in the following line:

Install Dante Socks Proxy Centos 7

Yes, it is the system user. If you specify root you have to log in with the username “root” and the password of your server/vps that you use for SSH access.

//EDIT: Technically authentication had been enabled before,too except now you just disabled the access for non-verified users.

Install Dante Socks Proxy Centos 7 Download

You might have to start the server as root for authentication to work (or with sudo).

Restart danted/dante-server:

Socks Proxy Yahoo

.. and check if the authentication works. I checked it with the P2P file sharing program “Ares” which returns “Test passed” if it works. And that’s it, hope this tutorial helped someone. 🙂