Linux 下配置Socket5

oot@localhost ss5-3.8.9]# yum install pam-devel openldap-devel openssl-devel
[root@localhost socket5]# wget http://sourceforge.net/projects/ss5/files/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz/download
[root@localhost socket5]# tar -zxvf ss5-3.8.9-8.tar.gz
[root@localhost socket5]# cd ss5-3.8.9
[root@localhost ss5-3.8.9]# ./configure
[root@localhost ss5-3.8.9]# make

[root@localhost ss5-3.8.9]# make install
编辑配置文件
[root@localhost ss5-3.8.9]# vi /etc/opt/ss5/ss5.conf
插入
auth 0.0.0.0/0 - u

permit u 0.0.0.0/0 - 0.0.0.0/0 - - - - -

创建用户名密码
[root@localhost ss5-3.8.9]# vi /etc/opt/ss5/ss5.passwd
一行一个用户名密码,空格隔开
[root@localhost ss5-3.8.9]# chmod +x /etc/init.d/ss5

[root@localhost ss5-3.8.9]# /etc/init.d/ss5 start
[root@localhost ss5-3.8.9]# netstat -nap|grep ss5
tcp 0 0 0.0.0.0:1080 0.0.0.0:* LISTEN 28870/ss5

############################
如果需要限制访问某些ip地址可以增加
permit - 0.0.0.0/0 - 1.1.1.1 80 http - - -

permit - 0.0.0.0/0 - 2.2.2.2 80 http - - -

规则是按顺序向下匹配,匹配到则通过,否则拒绝
也可以使用域名,这样就只能访问这个域名,但是感觉不好用,子页面无法查看,把域名对应的ip加入后,就可以正常访问网站了
permit - 0.0.0.0/0 - www.abc.com 80 http - - -

猜你喜欢

转载自blog.csdn.net/l848168/article/details/88793466