Клиентские настройки:В ядре
options NETGRAPH
options NETGRAPH_PPTPGRE
options NETGRAPH_MPPC_ENCRYPTION
options NETGRAPH_BPF
Настройки mpd:
------------ mpd.conf ------------
default:
load vpn
vpn:
new -i ng0 vpn vpn
set iface idle 0
set bundle disable multilink
set bundle authname "*****"
set bundle password "*****"
set iface up-script /usr/local/etc/mpd/io-up.sh
set iface down-script /usr/local/etc/mpd/io-down.sh
set link mtu 1500
set iface enable tcpmssfix
set link keep-alive 60 180
set link accept chap
set link no pap
set bundle disable compression
set ccp yes mpp-e40
set ccp no mpp-e128
set bundle disable crypt-reqd
set ccp no mpp-stateless
set ipcp no vjcomp
open
------------ mpd.links ------------
vpn:
set link type pptp
set pptp self внешний адрес интерфейса на машине
set pptp peer 10.1.1.1
set pptp enable originate incoming outcall
------------ io-down.sh ------------
#!/bin/sh
#iface=$4
ip_def_gw=10.2.13.1
/sbin/route delete 10.1.1.1
/sbin/route change default $ip_def_gw
------------ io-up.sh ------------
#!/bin/sh
iface=$4
ip_def_gw=10.2.13.1
/sbin/route delete 10.1.1.1
/sbin/route add 10.1.1.1 $ip_def_gw
/sbin/route change default $iface -ifp ng0
Как то вроде того :)