日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

PPTP一键安装包

發布時間:2025/4/5 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PPTP一键安装包 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

下載地址:

http://mirrors.linuxeye.com/oneinstack/***_centos.sh



#!/bin/bash # #?Author:??yeho?<lj2007331?AT?gmail.com> #?Blog:??http://blog.linuxeye.com # #?Installs?a?PPTP?×××-only?system?for?CentOS #?Check?if?user?is?root [?$(id?-u)?!=?"0"?]?&&?{?echo?-e?"\033[31mError:?You?must?be?root?to?run?this?script\033[0m";?exit?1;?}? export?PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin clear printf?" ####################################################################### #????LNMP/LAMP/LANMP?for?CentOS/RadHat?5+?Debian?6+?and?Ubuntu?12+????# #????????????Installs?a?PPTP?×××-only?system?for?CentOS???????????????# #?For?more?information?please?visit?http://blog.linuxeye.com/31.html??# ####################################################################### " [?!?-e?'/usr/bin/curl'?]?&&?yum?-y?install?curl ×××_IP=`curl?ipv4.icanhazip.com` ×××_USER="linuxeye" ×××_PASS="linuxeye" ×××_LOCAL="192.168.0.150" ×××_REMOTE="192.168.0.151-200" while?: doechoread?-p?"Please?input?username:?"?×××_USER?[?-n?"$×××_USER"?]?&&?break done while?: doechoread?-p?"Please?input?password:?"?×××_PASS[?-n?"$×××_PASS"?]?&&?break done clear if?[?-f?/etc/redhat-release?-a?-n?"`grep?'?7\.'?/etc/redhat-release`"?];then#CentOS_REL=7if?[?!?-e?/etc/yum.repos.d/epel.repo?];thencat?>?/etc/yum.repos.d/epel.repo?<<?EOF [epel] name=Extra?Packages?for?Enterprise?Linux?7?-?\$basearch #baseurl=http://download.fedoraproject.org/pub/epel/7/\$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=\$basearch failovermethod=priority enabled=1 gpgcheck=0 EOF fifor?Package?in?wget?make?openssl?gcc-c++?ppp?pptpd?iptables?iptables-services?doyum?-y?install?$Packagedoneecho?'net.ipv4.ip_forward?=?1'?>>?/etc/sysctl.conf elif?[?-f?/etc/redhat-release?-a?-n?"`grep?'?6\.'?/etc/redhat-release`"?];then#CentOS_REL=6for?Package?in?wget?make?openssl?gcc-c++?iptables?ppp?doyum?-y?install?$Packagedonesed?-i?'s@net.ipv4.ip_forward.*@net.ipv4.ip_forward?=?1@g'?/etc/sysctl.confrpm?-Uvh?http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpmyum?-y?install?pptpd elseecho?-e?"\033[31mDoes?not?support?this?OS,?Please?contact?the?author!?\033[0m"exit?1 fi echo?"1"?>?/proc/sys/net/ipv4/ip_forward sysctl?-p?/etc/sysctl.conf [?-z?"`grep?'^localip'?/etc/pptpd.conf`"?]?&&?echo?"localip?$×××_LOCAL"?>>?/etc/pptpd.conf?#?Local?IP?address?of?your?×××?server [?-z?"`grep?'^remoteip'?/etc/pptpd.conf`"?]?&&?echo?"remoteip?$×××_REMOTE"?>>?/etc/pptpd.conf?#?Scope?for?your?home?network if?[?-z?"`grep?'^ms-dns'?/etc/ppp/options.pptpd`"?];thenecho?"ms-dns?8.8.8.8"?>>?/etc/ppp/options.pptpd?#?Google?DNS?Primaryecho?"ms-dns?209.244.0.3"?>>?/etc/ppp/options.pptpd?#?Level3?Primaryecho?"ms-dns?208.67.222.222"?>>?/etc/ppp/options.pptpd?#?OpenDNS?Primary fi echo?"$×××_USER?pptpd?$×××_PASS?*"?>>?/etc/ppp/chap-secrets ETH=`route?|?grep?default?|?awk?'{print?$NF}'` [?-z?"`grep?'1723?-j?ACCEPT'?/etc/sysconfig/iptables`"?]?&&?iptables?-I?INPUT?4?-p?tcp?-m?state?--state?NEW?-m?tcp?--dport?1723?-j?ACCEPT [?-z?"`grep?'gre?-j?ACCEPT'?/etc/sysconfig/iptables`"?]?&&?iptables?-I?INPUT?5?-p?gre?-j?ACCEPT? iptables?-t?nat?-A?POSTROUTING?-o?$ETH?-j?MASQUERADE iptables?-I?FORWARD?-p?tcp?--syn?-i?ppp+?-j?TCPMSS?--set-mss?1356 service?iptables?save sed?-i?'s@^-A?INPUT?-j?REJECT?--reject-with?icmp-host-prohibited@#-A?INPUT?-j?REJECT?--reject-with?icmp-host-prohibited@'?/etc/sysconfig/iptables? sed?-i?'s@^-A?FORWARD?-j?REJECT?--reject-with?icmp-host-prohibited@#-A?FORWARD?-j?REJECT?--reject-with?icmp-host-prohibited@'?/etc/sysconfig/iptables? service?iptables?restart service?pptpd?restart chkconfig?pptpd?on clear echo?-e?"You?can?now?connect?to?your?×××?via?your?external?IP?\033[32m${×××_IP}\033[0m" echo?-e?"Username:?\033[32m${×××_USER}\033[0m" echo?-e?"Password:?\033[32m${×××_PASS}\033[0m"




在centos 6下安裝測試可用。

轉載于:https://blog.51cto.com/leboit/1700220

總結

以上是生活随笔為你收集整理的PPTP一键安装包的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。