PPTP VPN with /etc/ppp/peers file

With a ppp peers file you can set up a connection which is restarted automatically after a disconnect.

First of all create a new peers file. Create a new file as user root in /etc/ppp/peers/internetlogin with the following content

### Benutzernamen hier eintragen
name BENUTZERNAME@padnet.de
remotename BENUTZERNAME@padnet.de
lock
noauth
nodeflate
nobsdcomp
debug
mtu 1490
mru 1490
lcp-echo-failure 5
lcp-echo-interval 120
idle 86400
defaultroute
replacedefaultroute
holdoff 30
maxfail 0
refuse-eap
refuse-pap
refuse-chap
pty "pptp login.padnet.de --nolaunchpppd"
### Verschluesselungsoptionen
require-mppe-40
require-mppe-128
nomppe-stateful
+ipv6

Insert your user name and password in clear text into the file /etc/ppp/chap-secret. The file should be protected using chmod 600 /etc/ppp/chap-secrets, so that it can only be read by the root user.

The file should contain the following line

USERNAME@padnet.de * PASSWORD *

By executing pppd call internetlogin as user root, you should be able to start the connection. Debug output to the console can be received by pppd call internetlogin nodetach.

It is important to set up a route for additional services within the PadNet, to be able to connect to all services and other people in other dormitories.

Using a debian based distribution (for ex. Ubuntu) a connection can automatically be started including a route on system startup.

To make this working, please insert the following into /etc/network/interfaces

# Please replace Fixme by the correct Default Gateway for your network
auto eth0
iface eth0 inet dhcp
    up route add -net 10.3.0.0/16 gw 10.3.Fixme.1 
    up pon internetlogin
    down poff internetlogin
iface ppp0 inet ppp
        provider internetlogin