this small howto leads you through setting up the M$vpn pptp connection as used in the students' hostel, fantoft, bergen, norway. it is derived from the howtos found at uib.no, focuses on debian systems and tries to be easy to follow. if you encounter problems with this howto, feel free to submit corrections to felix aet salfelder doht org.
apt-get install pptp-linux ppp
iface uib inet dhcp
# fix routes.
post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw $( route -n |grep '^0.0.0' |awk '{print $2}' ) dev $IFACE
post-up route del default dev $IFACE
# dial using ppp
post-up pon MY_UIB_PEER
pre-down poff MY_UIB_PEER
defaultroute noauth nobsdcomp nodeflate #debug #require-mppe-128 name MY_USERNAME # thats the name used in pap-secrets remotename MY_REMOTE_NAME # here the name of the host to be connected pty "pptp uib-vpn-gw --nolaunchpppd" # pty "pptp uib-vpn-gw --loglevel 2 --nolaunchpppd"
MY_USERNAME MY_REMOTE_NAME MY_PASSWORD *
now do ifup eth0=uib to switch on and ifdown eth0 to switch off the interface.
if you use ifplugd (which you want!), you add
test1 peer address 10.10.80.1 source MY_IP_ADDRESS mac 00:0f:f7:e0:3b:00to the stanza in your interfaces, where MY_IP_ADDRESS is the address obtained from dhcp (which is fixed to the mac of your interface). The ifup and ifdown commands are then executed on inserting/removing the cable.