CentOS under Shadowsocks-libev One-click installation script

Source: Internet
Author: User
Tags centos iptables server port firewall

This script applies to the environment:
System support: Centos/redhat/fedora
Memory Requirements: ≥128m
Date: May 08, 2014

About this script:
One-click to install the latest version of the Libev version of Shadowsocks. This version is characterized by small memory footprint (around 600k), low CPU consumption, and can even be installed on OpenWrt based routers.


Default configuration:
Server port: 8989
Client Port: 1080
Password: Set yourself (if not set, default is Teddysun.com)

Client Downloads:
http://sourceforge.net/projects/shadowsocksgui/files/dist/

How to use:
Log on using the root user to run the following command:

wget--no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev.sh
chmod +x shadowsocks-libev.sh
./shadowsocks-libev.sh 2>&1 | Tee Shadowsocks-libev.log
When the installation is complete, the script prompts as follows:

Congratulations, Shadowsocks-libev install completed!
Your Server IP: (Your server IP)
Your Server port:8989
Your Password: (The password you set)
Your Proxy port:1080

Welcome to Visit:http://teddysun.com/357.html
Enjoy it! ^_^
Uninstall method:
Log on using the root user to run the following command:

./shadowsocks-libev.sh Uninstall
Other matters:
Reference link for client configuration: http://teddysun.com/339.html

After the installation is completed, the Shadowsocks is started in the background, running:

Ps-ef | grep Ss-server | Grep-v PS | Grep-v grep
You can see if a process exists.
After this script is installed, the Shadowsocks-libev will be added to the power-on self boot.

To use the command:
Start:/etc/init.d/shadowsocks start
Stop:/etc/init.d/shadowsocks stop
Reboot:/etc/init.d/shadowsocks Restart
View Status:/etc/init.d/shadowsocks status

Special Note:
1, installed the old version of the shadowsocks need to upgrade, you need to download the latest version of this script, run the uninstall command. After/shadowsocks-libev.sh Uninstall, execute this script again to install the latest version.
2, about the CentOS default iptables firewall rule icmp-host-prohibited, if after installation found that the Shadowsocks has started, the local client can not connect, please check the iptables is like the following rule:

REJECT All--0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
To run the command:

/etc/init.d/iptables status
can be viewed. If you have this rule, the 8989 ports you add need to be changed manually and placed on the previous line of this rule. Edit the/etc/sysconfig/iptables file to:

-A input-p tcp-m state--state new-m TCP--dport 8989-j ACCEPT
Put in:

-A input-j REJECT--reject-with icmp-host-prohibited
The front. The final effect is as follows:

-A input-p tcp-m state--state new-m TCP--dport 8989-j ACCEPT
-A input-j REJECT--reject-with icmp-host-prohibited
When you are finished editing, restart the iptables firewall. Command:/etc/init.d/iptables restart

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.