Connect to Windows VPN

- Install package pptp-linux

- Create file /etc/ppp/peers/YOUR_COMPANY with the this content:
pty “pptp YOUR_VPN_GATEWAY –nolaunchpppd”
debug
nodetach
logfd 2
noproxyarp
ipparam YOUR_COMPANY
remotename YOUR_COMPANY
name YOUR_DOMAIN_OR_SERVER_NAME\\YOUR_VPN_LOGIN
require-mppe-128
nobsdcomp
nodeflate
lock
noauth
refuse-eap
refuse-chap
refuse-mschap

- add to /etc/ppp/chap-secrets:
YOUR_DOMAIN_OR_SERVER_NAME\\YOUR_VPN_LOGIN * YOUR_VPN_PASSWORD *

- Create file /etc/ppp/ip-up.d/add-subnet with content similar to:
#!/bin/bash
[ "$PPP_IPPARAM" = "YOUR_COMPANY" ] || exit 0
route add -net 192.168.100.0/24 gw $PPP_LOCAL

In the above line, adjust subnet values (192.168.100.0/24) if needed

- Make /etc/ppp/ip-up.d/add-subnet executable

- Connect to VPN:
sudo pon YOUR_COMPANY
To disconnect, press Ctrl+C or close the terminal.

- If you do not want to see VPN connection debug output, in file /etc/ppp/peers/YOUR_COMPANY delete 3 lines:
debug
nodetach
logfd 2

In this case, “pon YOUR_COMPANY” will run as a background process. Use “poff YOUR_COMPANY” to disconnect.

from here

Tags: , ,

Leave a Reply


This blog is multi language by p.osting.it's Babel