PPTP (VPN) for FreeBSD
First of all, you need to install net/mpd5. You do not need to compile mpd5 with the NG_CAR or NG_IPACCT flag set.
# cd /usr/ports/net/mpd5
# make config
# make install clean
The configuration file for mpd5 is located at /usr/local/etc/mpd5/mpd.conf. Note that there is no command telling mpd5 to establish a default route through a newly established tunnel. We start with a basic configuration that does not set the default route yet to make sure the connection works.
create bundle static PSH_BUNDLE
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
set bundle enable compression
set ccp yes mppc
set mppc yes e128
set mppc yes stateless
create link static PSH_LINK pptp
set link action bundle PSH_BUNDLE
set auth authname USERNAME
set auth password PASSWORD
set link no eap pap chap
set link accept chap-msv2
set link max-redial 0
set link mtu 1360
set link keep-alive 20 75
set pptp peer IP_ADDR
set pptp enable windowing
Please make sure to replace USERNAME and PASSWORD by your proxy.sh credentials, and to change IP_ADDR to the correct proxy.sh PPTP IP shown in your welcome email or panel's service details.
Since the configuration file is located at its default location, it is sufficient to just call mpd5 without any parameters from a shell. When invoked without any parameters, mpd5 will not drop into background. To exit from mpd5, press CTRL-C.
The connection should get established.
To initialize the VPN connection during system start-up, add the line mpd_enable="YES" to /etc/rc.conf.
# echo "mpd_enable=\"YES\"" >> /etc/rc.conf
Before rebooting, verify mpd5's start-up script to work correctly.
# /usr/local/etc/rc.d/mpd5 start
Wait some seconds and invoke ifconfig again. The ng0 interface should show up. Note that IP addresses have changed.
# ifconfig ng0
ng0: flags=88d1 metric 0 mtu 1356
inet xxx.xxx.xxx.xxx --> xxx.xxx.xxx.xxx netmask 0xffffffff
Now stop mpd5.
# /usr/local/etc/rc.d/mpd5 stop
Waiting for PIDS: 1261.
If starting and stopping mpd5 via the start-up script worked well, the VPN connection will be available every time the machine is started.
That's all. Enjoy!
NB: If you encounter difficulties to connect with PPTP, please try to switch to OpenVPN. OpenVPN is more reliable, more secure and more flexible. OpenVPN also allows you to try various ports, including 'discreet' ones such as TCP 443. Below, you will find an aggregate of useful guides and articles that will help you troubleshoot your problems, should you have any.
Guide for setting up OpenVPN with default client on FreeBSD.
I cannot find the .ovpn and .crt files necessary for OpenVPN. Where are they?
No matter how hard I try, I cannot succesfully connect to OpenVPN.
I can't access any website through my browser while connected to VPN.
I am connected to the VPN but my IP is not yet hidden. Help!
I am having some kind of other problem. Where can I find some help?
How can I find the local log files of my VPN client?
If you still cannot connect successfully, please open a support ticket and include either a copy of your logs or a screenshot of your configuration and encountered errors. Logs can usually be found in software menus or settings, as well as their directories of installation (.log or .txt files). If you do not include a log or a screenshot, it will be hard for us to help you resolve the issues you have with connecting to our network.
Related Knowledgebase Articles
OpenVPN for FreeBSD (Views: 1464)
CGIProxy (Web) for FreeBSD (Views: 886)
L2TP (VPN) for FreeBSD (Views: 1101)