PPTP VPN server on Ubuntu: a legacy configuration example

A historical PPTP server example with corrected commands and a clear warning: use a modern VPN for sensitive traffic.

PPTP VPN server on Ubuntu: a legacy configuration example

This is a legacy example for understanding an older VPN setup. PPTP is not recommended for a new or internet-facing VPN because its security mechanisms are weak. These steps do not guarantee a secure or private connection. For remote access, use a supported modern option such as WireGuard instead.

1. Update Ubuntu

Update package metadata and installed packages before testing in an isolated lab:

sudo apt update && sudo apt upgrade

2. Install the legacy server package

If the pptpd package is available for your Ubuntu release, install it. Package availability varies. Do not expose this service to the public internet for sensitive use.

sudo apt install pptpd

3. Configure server and client addresses

Edit /etc/pptpd.conf. The sample local address and client pool must fit your network and must not overlap addresses already in use.

sudo nano /etc/pptpd.conf
# Example settings in the file:
localip 192.168.1.1
remoteip 192.168.1.100-200

4. Add a test account

Edit /etc/ppp/chap-secrets and supply a unique strong test password. Its fields are client, server, secret and allowed client IPs; asterisks are wildcards. Restrict file access to root. Credentials over PPTP do not make this a modern secure VPN.

sudo nano /etc/ppp/chap-secrets
# Example line (replace the password):
username * REPLACE_WITH_A_STRONG_PASSWORD *
sudo chmod 600 /etc/ppp/chap-secrets

5. Enable forwarding only if required

For routing between networks, set net.ipv4.ip_forward=1 in /etc/sysctl.d/99-pptp-forward.conf and load it with sysctl. The original article misspelled /etc/sysctl.conf and omitted firewall and NAT rules: forwarding alone is not a complete gateway. Review firewall policy, routing and DNS in a controlled test environment.

sudo nano /etc/sysctl.d/99-pptp-forward.conf
# Add: net.ipv4.ip_forward=1
sudo sysctl --system

Conclusion

Treat PPTP as a compatibility case, not a privacy or security solution. Migrate clients to WireGuard or another currently supported secure VPN. Consult Ubuntu’s WireGuard documentation for a maintained setup: https://ubuntu.com/server/docs/how-to/wireguard-vpn/.

Share

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0