- 安装PPTP
apt-get update
apt-get upgrade
apt-get install iptables pptpd vim
- 设置并修改配置文件
vim /etc/pptpd.conflocalip 10.0.0.1
remoteip 10.0.0.100-200
添加VPN账号密码
vim /etc/ppp/chap-secrets添加DNS服务器IP
vim /etc/ppp/pptpd-options
ms-dns 8.8.8.8
ms-dns 8.8.4.4修改/etc/sysctl.conf
net.ipv4.ip_forward = 1
sysctl –p
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save
iptables –L
iptables-save > /etc/iptables.up.rules (重启生效)vim /etc/network/interfaces
auto lo
iface lo inet loopback
pre-up iptables-restore < /etc/iptables.up.rules重启pptpd服务
service pptpd restart备注:提示安装不了pptpd
vim /etc/apt/sources.list
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free
apt-get updatePC端可以上网,手机无法上网
往/etc/ppp/peers/testdb文件添加一行require-mppe-128参考链接:
https://www.digitalocean.com/community/tutorials/how-to-setup-your-own-vpn-with-pptp
相关文章
- Configure an PPTP Server on Debian
- 在 Ubuntu 配置 PPTP Server
- Configure Always On Availability Group for SQL Server on RHEL——Red Hat Enterprise Linux上配置SQL Server Always On Availability Group
- How to deploy openbr on linux server very shorly---- linuxmint13/ubuntu12.04 AMD64/debian7
- spring boot启动异常:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver
- VPN pptp on linuxmint13/ubuntu12.04/debian VPS
- 在 Debian 上安装 SQL Server vNext CTP1
- How to Install and Configure a VNC Server on RedHat Enterprise Linux (RHEL) 6
- 异常: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configurat
- Configure Always On Availability Group for SQL Server on Ubuntu