Centos shadowsocks installation tutorial, centosshadowsocks

Source: Internet
Author: User

Centos shadowsocks installation tutorial, centosshadowsocks

1. Run

Yum install python-setuptools & easy_install pip

Pip install shadowsocks

Ii. simple configuration

(1) Run vim/etc/shadowsocks. json

Copy the following parameters to the vim Editor:

{

"Server": "my_server_ip ",

"Port_password ":{

"8381": "atgeretg1 ",

"8382": "atgeretg2"

},

"Local_address": "127.0.0.1 ",

"Local_port": 1080,

"Timeout": 300,

"Method": "aes-256-cfb"

}

The configuration is very simple. Remember to manually modify it. Copy the modification to json.cn to verify that the format is correct.

Port_password can be configured with multiple accounts. Each line represents one account: Port: password.

Meaning of each field:

The IP address of the server and the Public IP address of the VPS.

Server_port server port

Local_port local port

Password used for encryption

Timeout (unit: seconds)

Method encryption method. Select bf-cfb, aes-256-cfb, des-cfb, rc4, and so on. The default is an insecure encryption, and the aes-256-cfb is recommended ".

Tips: rc4-md5 is recommended for encryption, because RC4 is several times faster than AES, if used on the router will bring significant performance improvement. The old RC4 encryption is insecure because Shadowsocks repeatedly uses the key on each connection and does not use IV. Now the correct implementation has been implemented again, so you can use it with confidence.

3. Grant the shadowsocks. json File Permission after the creation:

Sudo chmod 755/etc/shadowsocks. json

4. CentOS 7.0 uses firewall as the firewall by default. You must reset iptables to set iptables service.

Yum-y install iptables-services

1. Directly disable the Firewall

Systemctl stop firewalld. service # stop firewall

Systemctl disable firewalld. service # disable firewall startup

2. Modify the firewall configuration and add the firewall port

Vim/etc/sysconfig/iptables

Add Rules

-A input-m state -- state NEW-m tcp-p tcp -- dport 8381-j ACCEPT

-A input-m state -- state NEW-m tcp-p tcp -- dport8382-j ACCEPT

5. Save and exit

Systemctl restart iptables. service # restart the firewall to make the configuration take effect.

Systemctl enable iptables. service # Set firewall startup

Restart the system to make the settings take effect.

Vi. Running

Foreground running:

Ssserver-c/etc/shadowsocks. json

Background running:

Ssserver-c/etc/shadowsocks. json-d start

Stop background running:

Ssserver-c/etc/shadowsocks. json-d stop

View running logs:

Tail-f-n 100/var/log/shadowsocks. log

Use-h to view all parameters. We can directly select the background to run. If no error is reported, the ss runs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.