关注我们: 微信公众号

微信公众号

电脑用户请使用手机扫描二维码

手机用户请微信打开后长按二维码 -> 识别二维码

微博

Step 1:Install PPTP Server

VPN试用 2026-07-01 20:41:25 7 0

Setting up a PPTP VPN on a Linode server is possible, but note that PPTP is outdated and insecure (prone to attacks). Modern alternatives like OpenVPN, WireGuard, or IPsec are recommended. However, if you still need PPTP, here's how to configure it on Ubuntu/Debian:

  1. Update your system:
    sudo apt update && sudo apt upgrade -y
  2. Install PPTPD:
    sudo apt install pptpd -y

Step 2: Configure PPTP VPN

  1. Edit the PPTP config file:

    sudo nano /etc/pptpd.conf

    Add these lines (replace 168.100.1-100 with your preferred IP range):

    localip 192.168.100.1
    remoteip 192.168.100.2-100
  2. Set DNS servers (edit /etc/ppp/pptpd-options):

    sudo nano /etc/ppp/pptpd-options

    Add:

    ms-dns 8.8.8.8
    ms-dns 8.8.4.4
  3. Add VPN credentials (edit /etc/ppp/chap-secrets):

    sudo nano /etc/ppp/chap-secrets

    Format:

    username pptpd password *

Step 3: Enable IP Forwarding

Edit /etc/sysctl.conf:

sudo nano /etc/sysctl.conf

Uncomment or add:

net.ipv4.ip_forward=1

Apply changes:

sudo sysctl -p

Step 4: Configure NAT (Firewall Rules)

  1. Allow PPTP port (1723) and GRE protocol:
    sudo iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
    sudo iptables -A INPUT -p gre -j ACCEPT
  2. Set up NAT for VPN traffic:
    sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  3. Save rules (if using iptables-persistent):
    sudo apt install iptables-persistent -y
    sudo netfilter-persistent save

Step 5: Start and Enable PPTPD

sudo systemctl restart pptpd
sudo systemctl enable pptpd

Step 6: Connect to PPTP VPN

  • Windows:
    Go to Settings > Network & Internet > VPN > Add VPN.
    Enter your Linode server IP, username, and password.

  • Android/iOS:
    Add a new PPTP VPN in network settings.


⚠️ Important Security Notes:

  • PPTP uses weak encryption (easily cracked).
  • If security is a concern, use OpenVPN or WireGuard instead.
  • Consider enabling a firewall (UFW) to restrict access:
    sudo ufw allow 1723/tcp
    sudo ufw enable

Troubleshooting

  • Check logs:
    sudo tail -f /var/log/syslog
  • Ensure pptpd is running:
    sudo systemctl status pptpd

Better Alternatives on Linode

  1. WireGuard (Fast & Modern):
    sudo apt install wireguard
  2. OpenVPN (Widely Used):
    sudo apt install openvpn

Would you like a guide for WireGuard/OpenVPN instead? Let me know! 🚀

Step 1:Install PPTP Server

如果没有特点说明,本站所有内容均由蓝快加速器-VPN全球网络加速器|柔软而强大的网络自由—蓝快VPN原创,转载请注明出处!