Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Taught you how to build your own VPS server     - How to use the internal network IP forwarding to connect to the Internet on Linux (Linux)

- Linux environment password security settings (Linux)

- How to install Git on CentOS 7 (Linux)

- REDO LOG records management (Database)

- Ubuntu users to install the system indicator SysPeek 0.3 (Linux)

- Apache Kafka: the next generation of distributed messaging system (Server)

- Shell Scripting early experience (Programming)

- Safe learning through self-extracting package to achieve invasion (Linux)

- Linux firewall settings instance (Linux)

- Examples of Python any parameters (Programming)

- The difference between vi and nano (Linux)

- Linux in order to make NMAP hide and seek with the firewall (Linux)

- Depth understanding of the TCP protocol (Database)

- Linux - EXT2 file system is described in detail (Linux)

- Android recyclerview cardview (Programming)

- Getting Started with Linux: Learn how to upgrade Docker in Ubuntu (Server)

- How apt-get limited use IPv4 or IPv6 protocol to download (Linux)

- 10 Nginx safety tips (Linux)

- How to make Linux a non-root user uses less than 1024 ports (Linux)

- Ubuntu 10.10 install Oracle 10g Installation Guide (Database)

  Taught you how to build your own VPS server
  Add Date : 2018-11-21      
  There are always times that you want to own a VPS. Share this article the author in practice some experience, we can give those who build their own VPS friends a little help.



Need to buy a VPS with root privileges, then it purchased 512 M memory 5 G SSD, 500 G flow / month, 9.99 knife each year, but it seems now that low-cost packages over. Interested friends can look at other companies or other packages of VPS. Some friends said that some very fast, watch YouTube directly to 1440p, but I have not tested, currently my VPS speed can meet my needs, and DO the price is more expensive.

The figure is the use of SS and take IPsec VPN services, for reference only:



After the server purchase, installation CentOS7, because these tutorials are based CentOS7, install a new OS, moving tile union Tell your SSH port and root password, which they can not be customized, if you really want to remember the forgotten You can also reset the root password, or directly using sSH to log online to move bricklayer operation can also be provided, that is, the reaction is relatively slow, so after we commonly ssh login to configure the VPS, Mac is like under the direct use of the terminal, the next win on their own Looking for a tool like ssh.

Login ssh command:

$ Ssh-p vps port number address root @ vpsIP
After the login as equivalent in local operation, you can use various Linux commands to operate.


Configure the firewall

If SSH can not sign, it means the firewall turned off SSH port, you need to log in via SSH online turn off the firewall reconfiguration.


Clear Firewall Configuration

$ Iptables -F
Clear iptabels all entries, while nat did not set, but we will follow the script configuration, do not worry. If SSH login normally do not control the firewall.

Installation firewalld

$ Yum install firewalld firewall-config
$ Systemctl start firewalld
P.S. I was in after installing firewalld then start the service has failed is displayed, and then restart the server can again start firewalld normal service, and have friends in similar situations can restart the server.


Modify the SSH port

$ Vi / usr / lib / firewalld / services / ssh.xml
Will appear the following contents:

Secure Shell (SSH) is a protocol for logging into and executing commands on remote machines. It provides secure encrypted communications. If you plan on accessing your machine remotely via SSH over a firewalled interface, enable this option. You need the openssh -server package installed for this option to be useful.

The port = "22", modified to move bricklayer gives you the port number, and then reload firewalld on OK.

vi command: Press the "i" is in edit mode, after editing press "esc" to exit edit mode, then press Shift enter ":" and "wq" to save and exit vi.

$ Firewall-cmd --permanent --add-service = ssh
$ Firewall-cmd --reload
OK, now preparations are in place, the installation source, install a firewall is configured, the next step began to build the service.


Build Shadowsocks Service

This service is the simplest and most commonly used.


Mounting assembly

$ Yum install m2crypto python-setuptools
$ Easy_install pip
$ Pip install shadowsocks
When you install some components need to enter Y to confirm. VPS small memory components can be installed separately.


Server configuration parameters after installation

$ Vi / etc / shadowsocks.json
Written as follows:

"Server": "",
"Server_port": 8388,
"Local_address": "",
"Local_port": 1080,
"Password": "mypassword",
"Timeout": 300,
"Method": "aes-256-cfb",
"Fast_open": false,
"Workers": 1
Will replace the above mypassword as your password, server_port also can be modified, for example, 443 is Shadowsocks client default port number.

If you need to change the port, you need to open ports in the firewall in response, with firewalld operation is relatively simple:

$ Vi / usr / lib / firewalld / services / ss.xml
Paste the following code into it: