Skip to content

kotsiossp97/linux_vpn_connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

linux_vpn_connector

Script that creates connection to PPTP VPN on linux

Requirements

pptp-linux package must be installed on your machine. Install it with the command:

sudo apt install pptp-linux

Usage

  • Download the script on your linux machine.
  • Give execution permission to the file.
chmod +x linux_vpn_connector.sh
  • Run the script with the required arguments
sudo ./linux_vpn_connector.sh -n <Connection_Name> -s <VPN_Host> -u <Username> -p <Password>
  • After script ran successfully, you can connect to the VPN using the command:
sudo pon <Connection_Name>
  • To test the connection, you can ping an IP on the VPN:
ping <IP_Address> -I ppp0
  • To route specific traffic through VPN, use the command:
ip route add <IP_Mask> dev ppp0

e.g ip route add 192.168.10.0/24 dev ppp0 routes all traffic to IPs 192.168.10.* through the VPN.

Note

Replace values in <> without the symbols.

e.g:

sudo ./linux_vpn_connector.sh -n testVPN -s 12.34.56.78 -u user -p secretPass!

ping 192.168.0.12

About

Script that creates connection to PPTP VPN on linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages