Don't write # before code 
And remove * in first code
1. Download the latest source rpm from sourceforge.net
2. Build the source rpm
This requires the rpmbuild tool provided by rpm-build package. Also, ss5 requires openldap-devel, pam-devel and openssl-devel development packages. Install these packages using YUM package manager:
For 32 bit Linux,
For 64 bit Linux,
Now build ss5 source rpm to create the binary rpm package:
3. Install SS5 rpm package
On CentOS 5.x, the RPM package will be created in /usr/src/redhat/RPMS/. On CentOS 6.x, RPM package will we created in the subdirectory rpmbuild/RPMS/ of build directory. You can install the RPM package using following command:
On CentOS 5,
(for 64 bit Linux)
(for 32 bit Linux)
On CentOS 6,
(for 64 bit Linux)
(for 32 bit Linux)
4. Run SS5 as root and change the port to 8899 (default port is 1080)
Edit /etc/init.d/ss5 and put following lines at the top after shabang(#!/bin/sh):
*Install nano:
(commands in nano: Ctrl+o -> Enter? SAVE, Ctrl+x -> Enter? EXIT)
You can use any available port you want. Make sure that the port is opened in the server firewall, if any.
5. User/password authentication
SS5 configuration file is /etc/opt/ss5/ss5.conf. The ?auth? directive sets the authentication policy.
For no authentication,
- -
For user/pass authentication,
The user/password pairs are stored in /etc/opt/ss5/ss5.passwd. Make sure that this file is readable only by root:
In /etc/opt/ss5/ss5.passwd, put user and password separated by a space and one user/password per line.
E.g.
6. Set permission (/etc/opt/ss5/ss5.conf)
Allow all hosts to connect:
7. Shutdown firewall
8. Start ss5 (/etc/opt/ss5/ss5.conf)
If you see an error message like the following,
Can?t create pid file /var/run/ss5/ss5.pid
Can?t unlink pid file /var/run/ss5/ss5.pid
create the directory /var/run/ss5 and start ss5 again.
That?s all.
And remove * in first code
1. Download the latest source rpm from sourceforge.net
Code:
[B]#wget http:*//downloads.sourceforge.*net/ss5/ss5-3.8.9-6.src.rpm[/B]
2. Build the source rpm
This requires the rpmbuild tool provided by rpm-build package. Also, ss5 requires openldap-devel, pam-devel and openssl-devel development packages. Install these packages using YUM package manager:
For 32 bit Linux,
Code:
[B]#[/B][B]yum install gcc rpm-build openldap-devel pam-devel openssl-devel -y[/B]
For 64 bit Linux,
Code:
[B]#[/B][B]yum install gcc.x86_64 rpm-build.x86_64 openldap-devel.x86_64 pam-devel.x86_64 openssl-devel.x86_64 libgssapi-devel.x86_64[/B][B] -y[/B]
Now build ss5 source rpm to create the binary rpm package:
Code:
[B]#[/B][B]rpmbuild --rebuild ss5-3.8.9-6.src.rpm[/B]
3. Install SS5 rpm package
On CentOS 5.x, the RPM package will be created in /usr/src/redhat/RPMS/. On CentOS 6.x, RPM package will we created in the subdirectory rpmbuild/RPMS/ of build directory. You can install the RPM package using following command:
On CentOS 5,
Code:
[B]#[/B][B]rpm -ivh /usr/src/redhat/RPMS/x86_64/ss5-3.8.9-6.x86_64.rpm[/B]
Code:
[B]#[/B][B]rpm -ivh /usr/src/redhat/RPMS/i386/ss5-3.8.9-6.i386.rpm
[/B]
On CentOS 6,
Code:
[B]#[/B][B]rpm -ivh rpmbuild/RPMS/x86_64/ss5-3.8.9-6.x86_64.rpm[/B]
Code:
[B]#[/B][B]rpm -ivh rpmbuild/RPMS/x86_64/ss5-3.8.9-6.i386.rpm[/B]
4. Run SS5 as root and change the port to 8899 (default port is 1080)
Edit /etc/init.d/ss5 and put following lines at the top after shabang(#!/bin/sh):
*Install nano:
Code:
[B]#yum install -y nano [/B]
Code:
[B]#nano [/B][B]/etc/init.d/ss5[/B]
[B]export SS5_SOCKS_PORT=8899
export SS5_SOCKS_USER=root[/B]
You can use any available port you want. Make sure that the port is opened in the server firewall, if any.
5. User/password authentication
SS5 configuration file is /etc/opt/ss5/ss5.conf. The ?auth? directive sets the authentication policy.
Code:
[B]#nano [/B][B]/etc/opt/ss5/ss5.conf[/B]
For no authentication,
Code:
[B]auth 0.0.0.0/0 [/B]
For user/pass authentication,
Code:
[B]auth 0.0.0.0/0 - u[/B]
The user/password pairs are stored in /etc/opt/ss5/ss5.passwd. Make sure that this file is readable only by root:
Code:
[B]#[/B][B]chown root.root /etc/opt/ss5/ss5.passwd[/B]
[B]#[/B][B]chmod 750 /etc/opt/ss5/ss5.passwd[/B]
In /etc/opt/ss5/ss5.passwd, put user and password separated by a space and one user/password per line.
E.g.
Code:
[B]#nano [/B][B]/etc/opt/ss5/ss5.passwd[/B]
[B]user1 pass1[/B]
[B]user2 pass2[/B]
6. Set permission (/etc/opt/ss5/ss5.conf)
Allow all hosts to connect:
Code:
[B]#nano [/B][B]/etc/opt/ss5/ss5.conf[/B]
[B]permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -[/B]
7. Shutdown firewall
Code:
[B]# service iptables save
# service iptables stop
# chkconfig iptables off[/B]
[B]# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off[/B]
8. Start ss5 (/etc/opt/ss5/ss5.conf)
Code:
[B]#[/B][B]service ss5 start[/B]
If you see an error message like the following,
Can?t create pid file /var/run/ss5/ss5.pid
Can?t unlink pid file /var/run/ss5/ss5.pid
create the directory /var/run/ss5 and start ss5 again.
That?s all.