1.安裝編譯環境
yum -y install gcc automake make
2.安裝ss5必要的包
yum -y install pam-devel openldap-devel cyrus-sasl-devel openssl-devel
3.下載並安裝ss5
wget http://sourceforge.net/projects/ss5/files/latest/download?source=files
tar zxvf ss5-*
cd ss5-*
./configure
make
make install
#更改ss5權限,使其可執行
chmod 700 /etc/init.d/ss5
#啓動ss5服務
/etc/init.d/ss5 start
如果下載時提示404錯誤,嘗試從 http://sourceforge.net/projects/ss5/ 這裏獲取最新版本的下載
地址。
4.配置ss5,允許指定用戶可以使用
ss5 默認情況下使用1080 端口,並且允許任何人使用。如果想要指定某個人纔可以使用的話,則需要修
改 /etc/opt/ss5/ss5.conf 中的
# SHost SPort Authentication
#
auth 0.0.0.0/0 - -
#修改爲:
# SHost SPort Authentication
#
auth 0.0.0.0/0 - u
# Auth SHost SPort DHost DPort Fixup Group Band
ExpDate
#
#permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -
修改爲:
# Auth SHost SPort DHost DPort Fixup Group Band
ExpDate
#
permit u 0.0.0.0/0 - 0.0.0.0/0 - - - - -
5.添加ss5用戶
最後需要在 /etc/opt/ss5/ss5.passwd 中添加連接 socks 5 時使用的 用戶名和密碼 如:
test passwd
6.重啓ss5服務
/etc/init.d/ss5 restart
#或者
service ss5 restart
7.設置開機啓動
#設置開機啓動
chkconfig ss5 on
最後別忘記修改防火牆規則,添加ss5端口例外哦。
注意: ss5.passwd 權限設置爲640時ss5將無法讀取裏面內容,默認644即可
參考:http://www.liuyuelong.net/post/10.html