SOCKS: Firewall Security Protocol for sessions (Socks: Protocol for sessions traversal across firewall securely) SOCKS protocol provides a framework for service to the client TCP and UDP domain / server applications can be more easily and safely use the network firewall provided . The protocol is conceptually between "interposer (shim-layer)" between the application layer and transport layer, is therefore not available as a delivery network gateway services layer of ICMP messages.
The following are my notes to build:
A mounting socks 5
1.1 Installation depends development library
# yum install pam-devel openldap-devel openssl-devel
2.1 Installation socks 5
wget http://nchc.dl.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz
tar -xzvf ss5-3.8.9-8.tar.gz
cd ss5-3.8.9
./configure
make
make install
Two, socks 5 arrangement
2.1 modify the configuration file
# vim /etc/opt/ss5/ss5.conf
auth 0.0.0.0/0 - -
Changed
auth 0.0.0.0/0 - u
permit – 0.0.0.0/0 – 0.0.0.0/0 - - - - -
Change it into
permit u 0.0.0.0/0 – 0.0.0.0/0 - - - - -
2.2 socket 5 user add
# vim /etc/opt/ss5/ss5.passwd
# 用户 密码
mytest 123456
2.3 Starting socket 5
# chmod u+x /etc/rc.d/init.d/ss5
# systemctl start ss5
2.4 Check whether to activate
# netstat -lntp | grep ss5
tcp 0 0 0.0.0.0:1080 0.0.0.0:* LISTEN 14262/ss5
The default port 1080
2.5 set from the start
# systemctl enable ss5
Third, pay attention
If the following error
Can’t create pid file /var/run/ss5/ss5.pid
Can’t unlink pid file /var/run/ss5/ss5.pid
We need to create / var / run / ss5 directory and then start the ss5, but after each restart the computer will write the article once the folder is deleted.
Temporary solution:
# vim /etc/rc.d/rc.local
mkdir -p /var/run/ss5
Save and exit, increasing execute permissions file
# chmod a+x /etc/rc.d/rc.local