FreeBSD VPN server with MPD5

From Stijn's resource
Jump to: navigation, search

These steps set up a PPTP VPN server on FreeBSD using MPD5


enable gateway_enable

# echo 'gateway_enable="YES"' >> /etc/rc.conf
# /etc/netstart

Install MPD5 from ports

mpd5 is found under ports/net/mpd5. insatll by:

# make && make install


the mpd configuration files are found under /usr/local/etc/mpd. There are sample files in the directory. You will need to create mpd.conf. Sample contents:

set console close
set web close
load pptp_server
load pppoe_client
set ippool add pool1 #internal ip pool, assigned to clients connecting to the VPN server
create bundle template B
set iface enable proxy-arp
set iface idle 1800
set iface enable tcpmssfix
set ipcp yes vjcomp
set ipcp ranges ippool pool1
set bundle enable compression
set ccp yes mppc
set mppc yes e40
set mppc yes e128
set mppc yes stateless
create link template L pptp
set link action bundle B
set link enable multilink
set link yes acfcomp protocomp
set link no pap chap
set link enable chap
set link keep-alive 10 60
set link mtu 1460
set pptp self X.X.X.X           #put in your server ip which will be connected to
set link enable incoming

make sure to chmod mpd.conf and mpd.secret to 440

Enable logging for mpd

edit /etc/syslog.conf, add:

*.*                                             /var/log/mpd.log

run the following to create the logfiles and change permissions:

# touch /var/log/mpd.log
# chmod 600 /var/log/mpd.log
# /etc/rc.d/syslogd reload

add mpd_enable to rc.conf

# echo 'mpd_enable="YES"' >> /etc/rc.conf

start mpd

# /usr/local/etc/rc.d/mpd5 start

to check if mpd is running:

# ps axw | grep mpd
Personal tools

Operating Systems
Hardware Virtualization