Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

How to Make Your Very Own ShadowSocks Server Guide

skretch_20

The Devotee
Advanced Member
Messages
358
Reaction score
1
Points
28
Attention: THIS is not FREE, you will have to pay atleast $5 to rent a Cloud VPS na pwede ninyong magamit for hosting a website, applications, VPN and Shadowsocks.

Tip lang: Gamitin nyong pang host ng WordPress site nyo ang Cloud VPS na to. Malaki ang kikitain sa pag blog at the same time may sariling VPN at Shadowsocks din kayo.

This tutorial will help you setup your very own Shadowsocks server on Vultr Cloud VPS.

Signing Up an Account in Vultr

If you don’t have a Vultr account, first you should sign up to get one. For new users, Vultr offers
a FREE $10 credit.

View attachment 311633

Disclaimer: Links to vultr on this tutorial is my affiliate link.

If you sign-up under this link your account will be credited $50 and use it to fund your Vultr account.

Lets Start!...



Create a Server at Vultr


1. After you have logged in your Vultr account,

Click on the blue “+” link on the right side of the interface.

View attachment 316424

Then you will be asked to choose options to Deploy New Instance.

Suggested and recommended options

Server Location: Mas malapit mas OK

Server Type: Ubuntu 16.10

Choose a size: select $5/mo (or the bigger one if you decide to do so)

Leave steps 4, 5, 6, 7

Enter any server and label name of your choice

Then click on the “Deploy Now” button to create your instance.

View attachment 316425

Once it’s done, you will be able to see your newly created instance listed under the Servers section of your

Vultr control panel.

Along with the name of the instance, you will also see an IP address for this.

Click your server to see your external IP address and your SSH Credentials

Connecting to Vultr Server to Setup Shadowsocks


Now that we have a Vultr server running, we need to connect to it and set up Shadowsocks.

You can connect to the server in two ways: using the web-based access console provided by Vultr, or SSH to it using
a terminal on your local computer.

Now, let’s SSH to your Vultr server using a command like this:

(If you are using the View Console Skip this Step and proceed immediately to 3rd Step)

View attachment 316426

1.

Code:
ssh root@{your_instance_IP_address}

Once you have SSHed to the server, run the following commands:
First, if your login account is not root:

2.

Code:
$ sudo su

Then let’s update our machine:

3. Login Using Your Credentials as shown in the picture

View attachment 316427

Once your logged in as root enter these commands:

Code:
$ apt-get update

Then let’s install shadowsocks using the following two commands:

4.

Code:
$ apt-get install python-pip 

$ pip install setuptools

$ pip install shadowsocks

Shadowsocks supports a number of encryption methods.

Below are the commands to setup the aes-256-cfb encryption:

5.

Code:
$ apt-get install python-m2crypto

$ apt-get install build-essential

$ wget https://github.com/jedisct1/libsodium/releases/download/1.0.10/libsodium-1.0.10.tar.gz

$ tar xf libsodium-1.0.10.tar.gz && cd libsodium-1.0.10

$ ./configure && make && make install

$ ldconfig

Now let’s create a config file for Shadowsocks, which should be created as “/etc/shadowsocks.json”. Let’s use the vi editor to do so:

6.
Code:
$ vi /etc/shadowsocks.json

(press “i” to edit and ESC then “:x” when your done to save the config)

Add the following contents to the shadowsocks config file:

7.1

Code:
{
    "server":"[COLOR="#FF0000"]your_server_IP_address[/COLOR]",
    "server_port":[COLOR="#FF0000"]8000[/COLOR],
    "local_port":1080,
    "password":"[COLOR="#FF0000"]your_password[/COLOR]",
    "timeout":600,
    "method":"aes-256-cfb"
}

Note that the configuration above only open up one port (8000) for your Shadowsocks server and it only supports one login.

If you want to set up multiple users each with a different passwords, you can do so by setting up multiple ports, each with a different password.

Below is a a config file example for doing that:

7.2

Code:
{
    "server":"[COLOR="#FF0000"]your_server_address[/COLOR]",
    "port_password": {
        "443": "[COLOR="#FF0000"]password1[/COLOR]",
        "8000": "[COLOR="#FF0000"]password2[/COLOR]",
        "8383": "[COLOR="#FF0000"]password3[/COLOR]",
        "8384": "[COLOR="#FF0000"]password4[/COLOR]"
    },
    "local_port":1080,
    "timeout":600,
    "method":"aes-256-cfb"
}
(press “i” to edit and ESC then “:x” when your done to save the config)

Now we are pretty much ready. We can start our new Shadowsocks server using this command:

8.

Code:
$ ssserver -c /etc/shadowsocks.json -d start

If you want to double check if everything is OK, you can check on Shadowsocks’ log file:

9.

Code:
$ less /var/log/shadowsocks.log

If you don’t see any error message in the Shadowsocks log file, then you are fine.

In the future, if you want to stop the Shadowsocks server, use this command: “ssserver -c /etc/shadowsocks.json -d
stop”.

If you want to restart the Shadowsocks server, use this command: “ssserver -c /etc/shadowsocks.json -d restart”.

There’s one more thing we need to set up. We need to make sure every time the server reboots our Shadowsocks
server will be started automatically. To do so, let’s use vi to edit the following file:

10.
Code:
$ vi /etc/rc.local

In the file opened, add the following line to the bottom, before “exit 0”:

/usr/bin/python /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start

Great. Now we have a Shadowsocks server running on Vultr!

If you want to stop here, it’s totally fine. You can now enjoy your newly created Shadowsocks server on Vultr
and use it as you wish.

But let’s continue with some tips for Shadowsocks server optimization.

Shadowsocks Server Optimization

By default, our Shadowsocks server might not be able handle a lot of traffic.

If you want it to be able to handle a large amount of concurrent connections, you need to increase the max number of open file descriptors. Now let’s do so:

11.

Code:
$ vi /etc/security/limits.conf

Add the following two lines to that file:

Code:
* soft nofile 51200
* hard nofile 51200

Note: Don’t skip the “*” symbols as they are parts of the lines. After that, let’s temporarily stop the Shadowsocks
server:

Code:
$ ssserver -c /etc/shadowsocks.json -d stop

And then set the ulimit:

Code:
$ ulimit -n 51200

Then let’s tune the kernel parameters by editing the /etc/sysctl.conf file:

Code:
$ vi /etc/sysctl.conf

Add the following lines to the end of that file:

Code:
fs.file-max = 51200

net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = cubic

To make our changes take effect, run this command:

Code:
$ sysctl -p

Now it’s time to re-start the Shadowsocks server:
Code:
$ ssserver -c /etc/shadowsocks.json -d start

Hope This Helped you Somehow. I'll try to help you as much as I can and according to my time vacant time.
 

Attachments

  • 2. Vultr-Login.png
    2. Vultr-Login.png
    201.8 KB · Views: 259
  • 3. Vultr-My-Server copy.png
    3. Vultr-My-Server copy.png
    198.7 KB · Views: 373
  • 7. Vultr-Server-Size copy.png
    7. Vultr-Server-Size copy.png
    250.5 KB · Views: 343
  • Screen Shot 2017-06-21 at 13.04.07.png
    Screen Shot 2017-06-21 at 13.04.07.png
    151.2 KB · Views: 398
  • Screen Shot 2017-06-21 at 13.04.07.png
    Screen Shot 2017-06-21 at 13.04.07.png
    166 KB · Views: 335
Last edited:
Code:
$ less /var/log/shadowsocks.log
Ito yung code kung ikaw mismo may ari ng server. But if hindi, I honestly don't know how. :)
 
thanks dito ts .gawa rin po sana kayo tut pano gumawa ng HPI and EHI .tagal ko na naghahanap wala ako makita.
 
Your Welcome, mas effective yata ang shadowsocks, yan ang ginagamit nila sa China para malampasan ang (GFW) kaya mukhang mahihirapan sigurong mawala ang bypass na to. Tyagain mo nalang na gumawa ng ShadowSocks at higit na mas pang matagalan ang reward ng sarili mong server. You will gain knowledge din on how to manage servers at higit sa lahat di lang pang shadowsocks yan, pwede rin pang host mo ng website.
 
pag yung vpn mo ideploy mo sa shadowsocks magiging freenet naba? kasi pag vpn lang kasi bali strong na security mo but not freenet.
 
pag yung vpn mo ideploy mo sa shadowsocks magiging freenet naba? kasi pag vpn lang kasi bali strong na security mo but not freenet.

Di ko lang po alam Sir, mukhang may karagdagang steps pa depende sa VPN.
 
nice tutorial ts. Galing mo.Newbie ako pagdating sa mga ganito. Mas makakatipid cgro if mag sign sa vultr kaysa sa plan sa globe
 
nice tutorial ts. Galing mo.Newbie ako pagdating sa mga ganito. Mas makakatipid cgro if mag sign sa vultr kaysa sa plan sa globe

Yes sir, mas makakatipid talaga. At ang learning dito on how to manage servers are very valuable. Hindi lang naman ito tungkol sa VPN or ShadowSocks, you can also use this for hosting your WordPress Website, or mga Android and iOs Apps.
 
di makaregister sa vultr ngayon TS. internal error
 
Attention: THIS is not FREE, you will have to pay atleast $5 to rent a Cloud VPS na pwede ninyong magamit for hosting a website, applications, VPN and Shadowsocks.

Tip lang: Gamitin nyong pang host ng wordpress site nyo ang Cloud VPS na to. Malaki ang kikitain sa pag blog at the same time may sariling VPN at Shadowsocks din kayo.

This tutorial will help you setup your very own Shadowsocks server on Vultr Cloud VPS.

Signing Up an Account in Vultr

If you don’t have a Vultr account, first you should sign up to get one. For new users, Vultr offers
a FREE $10 credit.

View attachment 1205999

Disclaimer: Links to vultr on this tutorial is my affiliate link.

If you sign-up under this link your $5 will become $10, so basically you will have 1 month free.

Lets Start!...



Create a Server at Vultr


1. After you have logged in your Vultr account,

Click on the blue “+” link on the right side of the interface.

View attachment 1206000

Then you will be asked to choose options to Deploy New Instance.

Suggested and recommended options

Server Location: Mas malapit mas OK

Server Type: Ubuntu 16.10

Choose a size: select $5/mo (or the bigger one if you decide to do so)

Leave steps 4, 5, 6, 7

Enter any server and label name of your choice

Then click on the “Deploy Now” button to create your instance.

View attachment 1206001

Once it’s done, you will be able to see your newly created instance listed under the Servers section of your

Vultr control panel.

Along with the name of the instance, you will also see a IP address for this.

Click your server to see your external IP address and your SSH Credentials

Connecting to Vultr Server to Setup Shadowsocks


Now that we have a Vultr server running, we need to connect to it and set up Shadowsocks.

You can connect to the server in two ways: using the web based access console provided by Vultr, or SSH to it using
a terminal on your local computer.

Now, let’s SSH to your Vultr server using command like this:

(If you are using the View Console Skip this Step and proceed immediately to 3rd Step)

View attachment 1206002

1.

Code:
ssh root@{your_instance_IP_address}

Once you have SSHed to the server, run the following commands:
First, if your login account is not root:

2.

Code:
$ sudo su

Then let’s update our machine:

3. Login Using Your Credentials as shown in the picture

View attachment 1206003

Once your logged in as root enter these commands:

Code:
$ apt-get update

Then let’s install shadowsocks using the following two commands:

4.

Code:
$ apt-get install python-pip 

$ pip install setuptools

$ pip install shadowsocks

Shadowsocks supports a number of encryption methods.

Below are the commands to setup the aes-256-cfb encryption:

5.

Code:
$ apt-get install python-m2crypto
$ apt-get install build-essential

$ wget https://github.com/jedisct1/libsodium/releases/download/1.0.10/libsodium-1.0.10.tar.gz

$ tar xf libsodium-1.0.10.tar.gz && cd libsodium-1.0.10

$ ./configure && make && make install

$ ldconfig

Now let’s create a config file for Shadowsocks, which should be created as “/etc/shadowsocks.json”. Let’s use the vi editor to do so:

6.
Code:
$ vi /etc/shadowsocks.json

(press “i” to edit and ESC then “:x” when your done to save the config)

Add the following contents to the shadowsocks config file:

7.1

Code:
{
    "server":"[COLOR="#FF0000"]your_server_IP_address[/COLOR]",
    "server_port":[COLOR="#FF0000"]8000[/COLOR],
    "local_port":1080,
    "password":"[COLOR="#FF0000"]your_password[/COLOR]",
    "timeout":600,
    "method":"aes-256-cfb"
}

Note that the configuration above only open up one port (8000) for your Shadowsocks server and it only supports one login.

If you want to set up multiple users each with a different passwords, you can do so by setting up multiple ports, each with a different password.

Below is a a config file example for doing that:

7.2

Code:
{
    "server":"[COLOR="#FF0000"]your_server_address[/COLOR]",
    "port_password": {
        "443": "[COLOR="#FF0000"]password1[/COLOR]",
        "8000": "[COLOR="#FF0000"]password2[/COLOR]",
        "8383": "[COLOR="#FF0000"]password3[/COLOR]",
        "8384": "[COLOR="#FF0000"]password4[/COLOR]"
    },
    "local_port":1080,
    "timeout":600,
    "method":"aes-256-cfb"
}
(press “i” to edit and ESC then “:x” when your done to save the config)

Now we are pretty much ready. We can start our new Shadowsocks server using this command:

8.

Code:
$ ssserver -c /etc/shadowsocks.json -d start

If you want to double check if everything is OK, you can check on Shadowsocks’ log file:

9.

Code:
$ less /var/log/shadowsocks.log

If you don’t see any error message in the Shadowsocks log file, then you are fine.

In the future, if you want to stop the Shadowsocks server, use this command: “ssserver -c /etc/shadowsocks.json -d
stop”.

If you want to restart the Shadowsocks server, use this command: “ssserver -c /etc/shadowsocks.json -d restart”.

There’s one more thing we need to set up. We need to make sure every time the server reboots our Shadowsocks
server will be started automatically. To do so, let’s use vi to edit the following file:

10.
Code:
$ vi /etc/rc.local

In the file opened, add the following line to the bottom, before “exit 0”:

/usr/bin/python /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start

Great. Now we have a Shadowsocks server running on Vultr!

If you want to stop here, it’s totally fine. You can now enjoy your newly created Shadowsocks server on Vultr
and use it as you wish.

But let’s continue with some tips for Shadowsocks server optimization.

Shadowsocks Server Optimization

By default, our Shadowsocks server might not be able handle a lot of traffic.

If you want it to be able to handle a large amount of concurrent connections, you need to increase the max number of open file descriptors. Now let’s do so:

11.

Code:
$ vi /etc/security/limits.conf

Add the following two lines to that file:

Code:
* soft nofile 51200
* hard nofile 51200

Note: Don’t skip the “*” symbols as they are parts of the lines. After that, let’s temporarily stop the Shadowsocks
server:

Code:
$ ssserver -c /etc/shadowsocks.json -d stop

And then set the ulimit:

Code:
$ ulimit -n 51200

Then let’s tune the kernel parameters by editing the /etc/sysctl.conf file:

Code:
$ vi /etc/sysctl.conf

Add the following lines to the end of that file:

Code:
fs.file-max = 51200

net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = cubic

To make our changes take effect, run this command:

Code:
$ sysctl -p

Now it’s time to re-start the Shadowsocks server:
Code:
$ ssserver -c /etc/shadowsocks.json -d start

Hope This Helped you Somehow. I'll try to help you as much as I can and according to my time vacant time.

sir galing mo gumawa ng TUT.... up for this thread..
 
Sir yung step 8? Sa ssh parin po bah yan gagawin? Baka po my video tut ka po pa upload para di mahirap newbie po sa ssh ..salamat sa karunungan na share po
 

Di ko pa din na try Sir, pero mostly ng free hosting na to ay managed. Di ko lang alam kong pwede ka bang maging root pag naka subscribe ka sa mga free hosting na to. At lagi po tandaan, na minsan or kadalasan pag Libre ang naaavail mo, ikaw at ang information mo ang kabayaran. :)

- - - Updated - - -

Sir yung step 8? Sa ssh parin po bah yan gagawin? Baka po my video tut ka po pa upload para di mahirap newbie po sa ssh ..salamat sa karunungan na share po

I will try to make a video tutorial Sir. :)

- - - Updated - - -

Sir yung step 8? Sa ssh parin po bah yan gagawin? Baka po my video tut ka po pa upload para di mahirap newbie po sa ssh ..salamat sa karunungan na share po

Yes Sir, lahat po ng mga commands ay nasa ssh.
 
may nabasa ako na pwede din gumawa ng ovpn server jan tama ba boss? may tutorials ka nyan boss? salamat nga pala sa info.
 
Your welcome sir, keep learning.

sir pede pa create ng shadowocks/ meron kasi ako active vps sa vtur ngayon. di ko naman maconfig sa pc ko yun command . di ko kasi ma paste sa command promt or console yun settings. ayaw mag paste
 
Back
Top Bottom