sudo apt-get install pptpd
如果提示找不到,则更新apt
sudo apt-get update
修改三个文件:
/etc/pptpd.conf
localip 192.168.0.1 VPN服务器的ip(不是真ip,是pptp子网的一个ip)
remoteip 192.168.0.100-192.168.0.200
/etc/ppp/pptpd-options 设置DNS
ms-dns 8.8.8.8
ms-dns 8.8.4.4
/etc/ppp/chap-secrets 设置用户名和密码
# client server secret IP addresses
username * password *
重启pptp服务:
sudo /etc/init.d/pptpd restart
启用IP转发# sudo nano /etc/sysctl.conf
去掉注释:net.ipv4.ip_forward=1
重新加载配置:sudo sysctl -p
添加转发规则:# sudo nano /etc/rc.local
在exit 0 前添加两行:
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
iptables -A FORWARD -p tcp --syn -s 192.168.0.0/24 -j TCPMSS --set-mss 1356
这个栗子使用192.168.0 作为PPTP子网
重启服务器 reboot
相关推荐
相关BIND9资料 博文链接:https://mqzsweet.iteye.com/blog/149843
Ubuntu server 讲述服务器的配置
ubuntu18.04server,系统安装
Ubuntu_Server搭建FTP服务器,
服务器安装Ubuntu Server,开启DNS服务。 服务器的IP:192.168.1.2 1.1 检查是否安装bind 使用命令dpkg -l bind*查看相关软件是否安装 这是安装的效果 如果没有安装就进行下一步 1.2 安装 BIND...
The Ubuntu Server Edition, also called Ubuntu Server, offers support for several common configurations, and also simplifies common Linux server deployment processes. With this book as their guide, ...
本文档是ubuntu server常用的网络配置方法和安装gcc的方法,以及更新源。
Ubuntu Server 12.04安装图解,附件中为安装过程中全部截图,可按照图中所选择部分安装
ubuntu server u盘制作方法
ubuntu 1204 server guide
ubuntu pppoe server环境搭建说明
VMware 下安装 ubuntu server 14.04 在这篇教程中,我们将学习如何在 VMware 中安装 ubuntu server 14.04 LTS。整个安装过程可以分为以下几个步骤:新建虚拟机、设置网络配置、用户设置、密码设置、分区设置等。 ...
Ubuntu Server64位系统安装Odoo10
在Ubuntu Server系统安装完成后默认没有使用network-manager管理网络,此文章简单介绍了如何使用network-manager管理网络。
Ubuntu Server最佳方案[高清完整PDF版].pdf
Ubuntu Server is a complete, free server operating system that just works, with the extra Ubuntu polish, innovation, and simplicity that administrators love. Now, there’s a definitive, ...
搜了一下百度,网上这块的资源比较少,于是自己摸索了一段时间终于做出来了
Ubuntu Server安装和配置手册