SOCKS5 Server Setup on Redhat Enterprise Linux 7

  1. Download the latest source rpm from sourceforge.net
    wget http://downloads.sourceforge.net/ss5/ss5-3.8.9-8.src.rpm
  2. Download and install compliation tools
    yum install gcc.x86_64 rpm-build.x86_64 openldap-devel.x86_64 pam-devel.x86_64 openssl-devel.x86_64 -y
  3. Download and install dependencies
    wget ftp://ftp.muug.mb.ca/mirror/centos/5.11/os/x86_64/CentOS/libgssapi-devel-0.10-2.x86_64.rpm
    wget ftp://ftp.muug.mb.ca/mirror/centos/5.11/os/x86_64/CentOS/libgssapi-0.10-2.x86_64.rpm
    rpm -ivh install libgssapi-0.10-2.x86_64.rpm libgssapi-devel-0.10-2.x86_64.rpm
  4. Compile the the source RPM
    rpmbuild –rebuild ss5-3.8.9-8.src.rpm
  5. Install the compiled RPM
    rpm -ivh rpmbuild/RPMS/x86_64/ss5-3.8.9-6.x86_64.rpm
  6. Edit /etc/init.d/ss5 and put following lines at the top after shabang(#!/bin/sh):
    export SS5_SOCKS_PORT=59
    export SS5_SOCKS_USER=root
  7. SS5 configuration file is /etc/opt/ss5/ss5.conf. The ‘auth’ directive sets the authentication policy.
    For no authentication,
    auth 0.0.0.0/0 – –
    For user/pass authentication,
    auth 0.0.0.0/0 – u
    Set permission

    Allow all hosts to connect:
    permit – 0.0.0.0/0 – 0.0.0.0/0 – – – – –

  8. The user/password pairs are stored in /etc/opt/ss5/ss5.passwd (user1 pass1) in each line. Make sure that this file is readable only by root:
    chown root.root /etc/opt/ss5/ss5.passwd
    chmod 750 /etc/opt/ss5/ss5.passwd
  9. Start ss5
    systemctl start ss5

Reference: http://blog.yegorgavrilov.com/2014/10/howto-ss5-socks5-proxy-server-on-centos.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s