Install the VPN (pptpd) server under bash script Centos6.3

Source: Internet
Author: User
Install the VPN (pptpd) server under bash script Centos6.3 #! /Bin/bashfunctioninstallVPN () {yumremove-route -- flushPOSTROUTING -- tablenatiptables -- flushFORWARDrm-rf/etc/pptpd. conf bash script Centos6.3 install the VPN (pptpd) server #! /Bin/bashfunction installVPN () {yum remove-y pptpd pppiptables -- flush POSTROUTING -- table natiptables -- flush FORWARDrm-rf/etc/pptpd. confrm-rf/etc/ppp * yum install-y ppp iptablesecho 1>/proc/sys/net/ipv4/ip_forwardcd/tmpwget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpmrpm-ivh pptpd-1.3.4-2.el6.x86_64.rpmcat>/etc/ppp/options.ppt pd < /Etc/pptpd. conf < >/Etc/ppp/chap-secretsservice pptpd restart-killservice pptpd startservice iptables restart} echo "which do you want? Input the number. "echo" 1. install VPN service "echo" 2. add VPN user "read numcase" $ num "in [1]) (installVPN); [2]) (addVPNuser); *) echo" nothing, exit ";; esacbash echo "Your VPN server configuration is complete, The default user password vpnuser as test123 Please run the script again to add custom user" has been tested many times and can run The vpn service properly. : No connection to the VPN server ip configuration and ping Baidu test the ip configuration after connecting to the VPN server and ping Baidu test
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.