1. synchronization time server yum-yinstallntpdatentpdatestdtimegovhkclock-1. synchronization time server
Yum-y install ntpdate
Ntpdate stdtime.gov.hk
Clock-w
-------------------------------------------------------
Ntpdate 210.72.145.44 no
Unknown cause
It is unclear whether synchronization will be performed multiple times in the future.
Not mounted yet
-------------------------------------------------------
I bought a virtual server space from digitalocean.
Build your own vpn
Your website will be built later
5 $ January
Https://www.digitalocean.com /? Refcode = 3a6149ad9924
2. set VPN-PPTP1.yum-y install ppp
2. download and install pptpd, you can get http://poptop.sourceforge.net/yum/stable/packages/ on this site
3. yum-y install perl
4. wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.4.0-1.el6.x86_64.rpm
Rpm-Uvh pptpd-1.4.0-1.el6.x86_64.rpm
5. after the installation, open/etc/pptpd. conf to add or modify the following configuration:
Localip 192.168.0.1 remoteip 192.168.0.234-238
6. open/etc/ppp/options.ppt pd and add the dns of the vpn (use google dns ):
Ms-dns 8.8.8.8
7. add an account to the vpn. open/etc/ppp/chap-secrets and add the user name and password in the following format:
Vpnuser pptpd thisisnewpwd *
The format is as follows: [username] [space] [server] [space] [password] [space] [IPaddresses]
8. we need to enable IP forwarding for the service. open/etc/sysctl. conf to change the following configuration:
Net. ipv4.ip _ forward = 1
# Net. ipv4.tcp _ syncookies = 1 comment out this line
9. run the following command to make the configuration take effect:
Sysctl-p
8. add rules to the firewall to allow NAT translation:
Iptables-t nat-a postrouting-o eth0-j MASQUERADE
Service iptables save
Service iptables restart
Note: When you finish step 9, check/etc/sysconfig/iptables. make sure that the POSTROUTING rule is before any REJECT rule.
10. enable the pptpd service and restart the server.
Chkconfig pptpd on
Init 6
After the system is restarted, you can connect to the server through the VPN client.