<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>shapeshifter.se &#187; PPTP</title>
	<atom:link href="http://www.shapeshifter.se/tag/pptp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shapeshifter.se</link>
	<description>Mostly miscellaneous technical mumbo-jumbo.</description>
	<lastBuildDate>Sat, 12 Dec 2009 12:00:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PPTP from FreeBSD</title>
		<link>http://www.shapeshifter.se/2009/03/10/pptp-from-freebsd/</link>
		<comments>http://www.shapeshifter.se/2009/03/10/pptp-from-freebsd/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 20:40:05 +0000</pubDate>
		<dc:creator>fli</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mpd]]></category>
		<category><![CDATA[PPTP]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.shapeshifter.se/?p=438</guid>
		<description><![CDATA[
Getting FreeBSD to connect to a Windows VPN using PPTP (who designed that protocol anyway?) is not the most pleasant experience, but at least it&#8217;s doable.
The most competent console tool for this in FreeBSD is probably Mpd5. It&#8217;s quite easy to work with but you&#8217;ll need to get all the details right otherwise it just [...]]]></description>
			<content:encoded><![CDATA[<p><!-- WSA: rules for context 'adsense-post-top' did not apply --><br />
Getting FreeBSD to connect to a Windows VPN using <a href="http://en.wikipedia.org/wiki/Pptp">PPTP</a> (who designed that protocol anyway?) is not the most pleasant experience, but at least it&#8217;s doable.</p>
<p>The most competent console tool for this in FreeBSD is probably <a href="http://mpd.sourceforge.net">Mpd5.</a> It&#8217;s quite easy to work with but you&#8217;ll need to get all the details right otherwise it just won&#8217;t work.</p>
<p>The following mpd.conf configuration file worked for me and allowed me to successfully connect to a Windows VPN. One of the keys were to disable EAP, this particular VPN server just plain refused to work with it enabled</p>
<blockquote>
<pre>default:
    load vpn
vpn:
    create bundle static B1
    # Create a default route (use a net/mask to create specific routes)
    set iface route default
    # Script to execute on connect (custom routes etc)
    # set iface up-script /usr/local/etc/route-up.sh
    # Accept any IP-address
    set ipcp ranges 0.0.0.0/0 0.0.0.0/0
    # Microsoft Point-to-Point Compression, only enable if you have a really fast machine
    # set bundle enable compression
    set ccp yes mppc
    set mppc yes e40
    set mppc yes e56
    set mppc yes e128
    create link static L1 pptp
    set link action bundle B1
    # Replace with you credentials or use the mpd.secret file
    set auth authname USERNAME
    set auth password SECRET
    set link max-redial 0
    set link mtu 1460
    set link keep-alive 20 75
    # Hostname/IP of the VPN server
    set pptp peer vpn.example.com
    set pptp disable windowing
    set link no eap</pre>
</blockquote>
<p>Save it to a file, say mpd.conf in /usr/local/etc/mpd.conf and simply run mpd5 mpd.conf and with some luck you&#8217;ll be connected the the VPN.</p>
<p><strong>The order of the statements are important</strong>. As they only apply to the current selected link (create link) or bundle (create bundle). Keep this in mind when editing.</p>
<h4>Windows logon name</h4>
<p>If you&#8217;re connecting to a Windows network you&#8217;ll probably need to use &#8220;DOMAIN\\username&#8221; as the authname (with the quotes and double backslash).</p>
<h4>Firewall and NAT issues</h4>
<p>The PPTP protocol is far from ideal. If you&#8217;re behind NAT chances are you won&#8217;t be able to do multiple PPTP connections to the <em>same</em> VPN server from within your LAN.</p>
<p>You&#8217;ll also need to allow the GRE protocol through, with Free/OpenBSD pf (packet filter) the following line is enough (you still won&#8217;t be able to do simultaneous connections to the same server though)</p>
<blockquote>
<pre>pass out on $ext_if proto gre from ($ext_if) to any keep state</pre>
</blockquote>
<p>Replace $ext_if with your external network interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shapeshifter.se/2009/03/10/pptp-from-freebsd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
