Unofficial Azure ClubAn independent cloud journal Search

Networks B10

Create SSH VPN over PPP

This example runs PPP over an SSH connection. Install ppp on both hosts and configure key-based SSH access to the remote host before starting the service. Replace the remote IP address with your own.

Create /etc/systemd/system/pppd.service with the following content:

[Unit]
Description=PPP over SSH
After=network.target

[Service]
ExecStart=/usr/sbin/pppd nodetach noauth silent nodeflate pty "/usr/bin/ssh root@<your_remote_server_ip> /usr/sbin/pppd nodetach notty noauth" ipparam vpn 172.18.8.1:172.18.8.2
Restart=on-failure

[Install]
WantedBy=multi-user.target

Reload systemd’s unit definitions, then enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable --now pppd