Using SS5 to configure socket5 agent on CentOS server

Time:2021-1-18

The first step is to download and install SS5

1. Install the necessary package of the system

Copy code

The code is as follows:

[[email protected] ~]# yum install gcc automake make

 

2. Install the necessary packages for Socks5

Copy code

The code is as follows:

[[email protected] ~]# yum -y install pam-devel openldap-devel cyrus-sasl-devel

 

3. Download and install socket5 (SS5)

Copy code

The code is as follows:

[[email protected] ~]# wget http://nchc.dl.sourceforge.net/project/ss5/ss5/3.8.9-6/ss5-3.8.9-6.tar.gz</p>
<p>[[email protected] ~]# tar xvf ss5-3.8.9-6.tar.gz</p>
<p>[[email protected] ~]# cd ss5-3.8.9</p>
<p>[[email protected] ss5-3.8.9]# ./configure</p>
<p>[[email protected] ss5-3.8.9]# make && make install

 

The second step is to configure SS5

1. Cancel the default socket4

Copy code

The code is as follows:

[[email protected] ss5-3.8.9]# mv /usr/lib/ss5/mod_socks4.so /usr/lib/ss5/mod_socks4.so.bak

 

2. Anyone is allowed to use it by default. Of course, we can’t do it

Copy code

The code is as follows:

[[email protected] ss5-3.8.9]# <span>vi /etc/opt/ss5/ss5.conf</span> # SHost SPort Authentication # auth 0.0.0.0/0 – <strong>u</strong> # Auth SHost SPort DHost DPort Fixup Group Band ExpDate # permit <strong>u </strong> 0.0.0.0/0 – 0.0.0.0/0 – – – – –

 

3. Set password

Copy code

The code is as follows:

[ [email protected] ~]# vi /etc/opt/ss5/ss5.passwd</p>

 

Step 3: start SS5

1. Give SS5 execution permission

Copy code

The code is as follows:

[[email protected] ~]# chmd +x /etc/rc.d/init.d/ss5

2. Start up

Copy code

The code is as follows:

[[email protected] ~]# service ss5 start

 

3. Check whether the port is opened successfully

Copy code

The code is as follows:

[[email protected] ~]# netstat -tnlp | grep 1080
tcp 0 0 0.0.0.0:1080 0.0.0.0:* LISTEN 21767/ss5

Seeing 1080 means success