Install SOCKS5 server on Linux

SOCKS5 is a proxy protocol that plays a mediation role between the front-end machine and server machine communication with TCP / IP protocol communication, so that the front-end machine in the internal network becomes the server in the Internet, or makes communication more secure. Here, take the CentOS as an example to describe how to install the SOCKS5 server under Linux.

1. First, compile and install SS5, you need to install some dependencies.

Yum Install GCC OpenLDAP-DEVEL PAM-DEVEL OPENSSL-DEVEL

2, go to the official website http://ss5.sourceforge.net/ download SS5 latest version of the source code

Wget https://ncu.dl.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz

3, start compiling and install after decompression:

Tar Zxvf ./ss5-3.8.9-8.tar.gz

CD SS5-3.8.9

./configure

Make

Make Install

4, let SS5 start with the system

CHMOD + X /etc/init.d/ss5

ChkConfig –Add SS5

ChkConfig –Level 345 SS5 on

5, open the SS5 configuration file, find the auth and permit in SS5.conf, open the comments from these two (it is auth, Permit two lines)

vim /etc/opt/ss5/ss5.conf

6, SS5 uses 1080 port by default, and allows anyone to use, if you want to modify the default port, modify VI / ETC / Sysconfig / SS5

In / etc / sysconfig / ss5 file, add this line command, -b’s back parameters represent the listening IP address and port number

# Add startup Option Here

SS5_OPTS = “-u root -b 0.0.0.0:8080”

7, start SS5

Service SS5 Start

8. Open the username password verification mechanism vi /etc/opt/ss5/ss5.conf

Sometimes we want to set users, only allow them to use the agent. Find two lines in SS5.Conf,

In this way, we need to change the above two

Auth 0.0.0.0/0 – U

Permit U 0.0.0.0 – 0.0.0.0/0 – – – – –

Set user name and password vi /etc/opt/ss5/ss5.passwd

A single account, the username and password are spaced between space, for example:

User1 123

User2 234

Restart the service

Service SS5 Restart

Uncategorized