<?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>OpenBSD and FreeBSD resources &#187; ADSL</title>
	<atom:link href="http://purebsd.com/tag/adsl/feed" rel="self" type="application/rss+xml" />
	<link>http://purebsd.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jun 2010 06:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Configuring ADSL</title>
		<link>http://purebsd.com/configuring-adsl.html</link>
		<comments>http://purebsd.com/configuring-adsl.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:53:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[ADSL]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=22</guid>
		<description><![CDATA[Nota bene In The Netherlands there are now, as far as I know, two different ways in which ADSL users have to configure their machines. One is without hassles (good!) and one is with hassles (bad!). The without-hassle method below is valid for people connecting to Demon in The Netherlands. Please inform me of other ISPs [...]]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0" width="700" align="center">
<tbody>
<tr>
<td width="572" valign="top"><strong>Nota bene</strong></p>
<p>In The Netherlands there are now, as far as I know, two different ways in which ADSL users have to configure their machines. One is without hassles (good!) and one is with hassles (bad!).</p>
<p>The without-hassle method below is valid for people connecting to <a href="http://www.demon.nl/">Demon</a> in The Netherlands. Please inform me of other ISPs implementing this method.</p>
<p>The with-hassle method below is valid for Alcatel ADSL modems as provided by the Dutch ISP<a href="http://www.planetinternet.nl/">Planet Internet</a>. People with an ADSL connection from the Austrian ISP <a href="http://www.inode.at/">Inode</a> should encounter no problems, but they may not be (entirely) correct for Other ISP&#8217;s, in The Netherlands or abroad.</p>
<p><strong>ADSL without hassles</strong></p>
<p>Say you have an external interface called <code>rl0</code>. While installing OpenBSD, configure the interface<code>rl0</code> by typing &#8220;dhcp&#8221; when asked for an IP address. If you&#8217;ve already a running install, you can edit <code>/etc/hostname.rl0</code>. That file should exist of only one line reading &#8220;dhcp&#8221;.</p>
<p>This is pretty much it. If you&#8217;re editing <code>/etc/hostname.rl0</code> after you installed OpenBSD, you should either reboot or run <code>route flush &amp;&amp; sh -x /etc/netstart</code>.</p>
<p>OpenBSD asks via the DHCP protocol your ISP to provide your machine with an IP address, gateway, DNS servers, etc. You might not like everything you receive from the remote DHCP daemon, so you might have to edit <code>/etc/dhclient.conf</code> in order to override some of the options the DHCP daemon whispers in your DHCP client&#8217;s ear:</p>
<p><code> supersede host-name "aurora";<br />
supersede domain-name "intranet.hezeldrama.net";<br />
prepend domain-name-servers 127.0.0.1;<br />
</code><br />
Above three lines tell the DHCP client to use &#8220;aurora&#8221; as the hostname of the machine, &#8220;intranet.hezeldrama.net&#8221; as its domain name and to setup <code>/etc/resolv.conf</code> in such a way that the first <code>nameserver</code> line reads &#8220;127.0.0.1&#8243;. The last option is required only if you&#8217;d like to run your own caching DNS server on the localhost (= 127.0.0.1).</p>
<p><strong>ADSL with hassles</strong></p>
<ol type="1">
<li>Reconfigure and recompile your kernel if you run the GENERIC OpenBSD kernel or a custom one, built with GRE (Generic Route Encapsulation) support. GRE eats the packets that are actually meant for the PPTP daemon software we&#8217;re about to use, resulting in a not working ADSL connection and the following error: <code>LCP: timeout sending Config-Requests</code>.So search for the line <code>pseudo-device	gre	1</code> in your kernel configuration file and disable it by putting a hash-sign (#) in front of that line. See the section <a href="http://purebsd.com/updating-the-system.html">updating</a> for more information on recompiling your kernel.
<p>Doing <code>sysctl -w net.inet.gre.allow=0</code> does <strong>not</strong> work. Reconfigure &amp; Recompile(tm).</li>
<li>Now you configure the network interface connected to your modem. Create or edit for this<code>/etc/hostname.&lt;if&gt;</code>, where <code>if</code> is the devicename of the interface:<code> inet 10.0.0.150 255.0.0.0 NONE</code></li>
<li>Download <a href="http://www.packetst0rm.net/html/projects/howto/pptp-obsd.tar.gz">PPTP software</a> from packetst0rm. Extract the source, run<code>make</code> and copy <code>pptp</code> and <code>pptp_callmgr</code> to <code>/usr/sbin</code>.</li>
<li>Edit <code>/etc/ppp/options</code> to read the following:<code> name "LOGINNAME"<br />
noauth<br />
noipdefault<br />
defaultroute<br />
debug<br />
</code><br />
Replace <code>LOGINNAME</code> with the loginname/username/user-id that you need to dial-in to your ISP.</li>
<li>Edit <code>/etc/ppp/pap-secrets</code> to read the following:<code> LOGINNAME 10.0.0.138 PASSWORD</code>
<p>Replace <code>LOGINNAME</code> with the loginname/username/user-id that you need to dial-in to your ISP. The same goes for <code>PASSWORD</code>.</li>
<li>If you do not run your own (caching) nameserver, you may like to edit<code>/etc/resolv.conf</code> to use the nameservers of your ISP:<code> search speed.planet.nl<br />
nameserver 195.121.1.34<br />
nameserver 195.121.1.66<br />
</code></li>
<li>Run <code>pptp 10.0.0.138</code> to login to your ISP. The ADSL internet link should now be up.</li>
<li>Credits:<br />
<a href="mailto:frost@packetst0rm.net">Michael Kummer</a> for his <a href="http://www.packetst0rm.net/html/projects/howto/openbsd-adsl-howto.html">OpenBSD ADSL howto</a><br />
<a href="mailto:l.ertl@univie.ac.at">Lukas Ertl</a> for his <a href="http://mailbox.univie.ac.at/~le/freebsd+adsl-howto.html">FreeBSD ADSL howto</a></li>
</ol>
<p><strong>ADSL with hassles: Afterwards</strong></p>
<ol type="1">
<li>For OpenBSD versions below 3.0:If you&#8217;d like to use NAT over your ADSL connection, disable the <code>ipnat</code> in your<code>/etc/rc.conf</code>, since ppp0 is not a valid configured interface at the time when<code>/etc/netstart</code> is run. Though <code>ipfilter</code> should be enabled.
<p><code> ipfilter=YES<br />
ipnat=NO<br />
</code><br />
Only when your ADSL connection is running and ppp0 is configured you should run:</p>
<p><code> /sbin/ipnat -CF -f /etc/ipnat.conf</code></p>
<p>For OpenBSD versions above 2.9:</p>
<p>You&#8217;re probably running PF and not IPFilter. I&#8217;m not sure if you need to do special things in order to have NAT work automatically when connected to the internet via de ADSL line. I&#8217;ll ask around.</li>
<li>You could optionally download this <a href="http://www.packetst0rm.net/html/projects/howto/adsl_reconnect.sh">ADSL reconnect script</a> from <a href="http://www.packetst0rm.net/">packetst0rm</a> and run it from crontab to reestablish a broken connection. But that&#8217;s <strong>not</strong> a usable script.Don&#8217;t panic! I wrote one myself. Though it is very brutal, it <strong>does</strong> reconnect in <strong>all</strong> possible situations as far as I know. Packetst0rm&#8217;s script didn&#8217;t.
<p>- View <a href="http://www.purebsd.com/adsl_reconnect.sh.txt">adsl_reconnect.sh</a><br />
- Download <a href="http://www.purebsd.com/files/adsl_reconnect.sh.gz">adsl_reconnect.sh</a> (gzipped)</p>
<p>The only thing you should configure is the REMOTE_IP variable, which is the IP address of the remote end of your PPTP tunnel. This IP can be found easily when ADSL is running:</p>
<p><code> $ ifconfig ppp0<br />
ppp0: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1500<br />
inet 62.131.xx.yyy --&gt; 195.190.aaa.bbb netmask 0xff000000<br />
</code><br />
Here, the &#8220;195.190.aaa.bbb&#8221; is the value you should assign to the REMOTE_IP variable.<br />
<strong>Note:</strong> some ISPs drop/block ping packets directed to the remote end of the PPTP tunnel or most if not all of their other servers. So it is advised to check if the IP you&#8217;d like to use is returning ping packets before using it in the reconnect script.</p>
<p>To have that reconnection script executed every five minutes you could edit <a href="http://purebsd.com/cron-crontab.html">root&#8217;s crontab</a>and insert the following somewhere:</p>
<p><code> # Check ADSL connection<br />
*/5 * * * * /root/bin/adsl_reconnect.sh &gt; /dev/null<br />
</code></li>
</ol>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/configuring-adsl.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

