Giter Club home page Giter Club logo

linode_vpn's Introduction

#Linode 设置VPN 服务

##1、安装PPTP服务器

更新软件 apt-get update 安装pptpd apt-get install pptpd ##2、配置PPTP服务器

用 vi 编辑/etc/pptpd.conf 查找如下内容:

*#localip 192.168.0.1 *#remoteip 192.168.0.234-238,192.168.0.245 把#去掉,然后修改成下面的

localip 192.168.217.1 remoteip 192.168.217.234-238,192.168.217.245 上面的两行为VPN服务器的IP和VPN客户端连接后获取到的IP范围。保存退出

添加PPTP VPN用户

##添加服用名。服务。密码

编辑/etc/ppp/chap-secrets 添加如下内容:

username pptpd password * 其中username为你要添加的VPN帐号的用户名,password为你VPN帐号的密码。

##修改DNS服务器

编辑/etc/ppp/options,添加如下内容:

ms-dns 8.8.8.8 ms-dns 8.8.4.4 开启IPv4转发

##编辑/etc/sysctl.conf文件,去掉net.ipv4.ip_forward=1前的注释 运行如下命令,使配置修改生效

sysctl -p

##重启pptpd服务

/etc/init.d/pptpd restart 安装iptables

apt-get install iptables

##开启iptables转发

iptables -t nat -A POSTROUTING -s 192.168.217.0/24 -o eth0 -j MASQUERADE iptables-save > /etc/iptables.pptp

##在/etc/network/if-up.d/目录下创建iptables文件,内容如下:

*#!/bin/sh iptables-restore < /etc/iptables.pptp 给脚本添加执行权限:

chmod +x /etc/network/if-up.d/iptables 至此PPTP VPN服务器端的设置就完成了。

linode_vpn's People

Contributors

qingjoin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.