Skip to content

Instantly share code, notes, and snippets.

@pooladkhay
Created June 2, 2021 07:27
Show Gist options
  • Save pooladkhay/a9ebe70f5ef67ab587ceb218bf41e4b4 to your computer and use it in GitHub Desktop.
Save pooladkhay/a9ebe70f5ef67ab587ceb218bf41e4b4 to your computer and use it in GitHub Desktop.
PPTP VPN Setup on Manjaro Sway
  1. Install pptp client $ sudo pacman -S pptpclient

  2. Add new vpn connection: $ pptpsetup --create my_tunnel --server vpn.example.com --username alice --password foo --encrypt

  3. Route All Traffic by /etc/ppp/ip-up.d: Create a file called 01-routes.sh under /etc/ppp/ip-up.d

  4. Append this lines to the newly created file:

#!/bin/bash

# This script is called with the following arguments:
# Arg Name
# $1 Interface name
# $2 The tty
# $3 The link speed
# $4 Local IP number
# $5 Peer IP number
# $6 Optional ``ipparam'' value foo

ip route add default via $4
  1. Make the file executeable: sudo chmod 755 01-routes.sh

  2. Connect: $ pon my_tunnel

  3. Disconnect: $ poff my_tunnel

  4. If you need to delete your delete your vpn connection: $ pptpsetup --delete my_tunnel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment