<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Isdn on TurboVision</title>
    <link>https://turbovision.in6-addr.net/tags/isdn/</link>
    <description>Recent content in Isdn on TurboVision</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 21 Apr 2026 14:06:12 +0000</lastBuildDate>
    <atom:link href="https://turbovision.in6-addr.net/tags/isdn/index.xml" rel="self" type="application/rss&#43;xml" />
    
    
    
    <item>
      <title>My D-Channel Syslog Hack and DynDNS Update for the Home Router</title>
      <link>https://turbovision.in6-addr.net/linux/home-router/dchannel-syslog-hack-and-dyndns-for-my-home-router/</link>
      <pubDate>Sun, 09 Apr 2000 00:00:00 +0000</pubDate>
      <lastBuildDate>Sun, 09 Apr 2000 00:00:00 +0000</lastBuildDate>
      <guid>https://turbovision.in6-addr.net/linux/home-router/dchannel-syslog-hack-and-dyndns-for-my-home-router/</guid>
      <description>&lt;p&gt;Now I have one of my favourite hacks on this router.&lt;/p&gt;
&lt;p&gt;The problem was simple: when I am not at home and the line is down, I still want a way to make the box go online. I do not want to call home, let somebody pick up, log in somewhere, and then maybe start the connection. I want a stupid simple trick. If I call the home number, the box should see that and bring the line up.&lt;/p&gt;
&lt;p&gt;But I do not want the caller to pay for the call. That was important for me. The whole trick should work before the call is really answered.&lt;/p&gt;
&lt;h2 id=&#34;what-the-d-channel-gives-me&#34;&gt;What the D-channel gives me&lt;/h2&gt;
&lt;p&gt;With ISDN the D-channel signal comes before the B-channel is really used for the actual call. isdn4linux logs things about incoming calls into syslog. When I noticed that, I got the idea that maybe I do not need some big elegant callback solution. Maybe I can just watch the logs.&lt;/p&gt;
&lt;p&gt;This is exactly what I do.&lt;/p&gt;
&lt;p&gt;I write a small bash script. I am not some shell master. My bash is honestly very small. But for this I only need a few things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tail -f&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;a loop&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isdnctrl dial ippp0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;also one &lt;code&gt;wget&lt;/code&gt; call&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is enough.&lt;/p&gt;
&lt;h2 id=&#34;the-very-small-ugly-core&#34;&gt;The very small ugly core&lt;/h2&gt;
&lt;p&gt;The script watches &lt;code&gt;/var/log/messages&lt;/code&gt; all the time. When an incoming-call line from i4l appears, the script checks if the caller number is one of my allowed numbers. If yes, it triggers the internet connection.&lt;/p&gt;
&lt;p&gt;Something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;ALLOWED&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;0301234567 01701234567&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tail -f /var/log/messages &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt; line&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -q &lt;span class=&#34;s2&#34;&gt;&amp;#34;i4l.*incoming\|isdn.*INCOMING&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;caller&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep -o &lt;span class=&#34;s1&#34;&gt;&amp;#39;[0-9]\{6,11\}&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; head -1&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;ok&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; a in &lt;span class=&#34;nv&#34;&gt;$ALLOWED&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$caller&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$a&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ok&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$ok&lt;/span&gt; -eq &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  /usr/sbin/isdnctrl dial ippp0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  sleep &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  /usr/bin/wget -q -O - &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://example-dyns.invalid/update?host=myrouter&amp;amp;pass=secret&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This is not art. This is not software engineering beauty. But it works.&lt;/p&gt;
&lt;p&gt;When I call the home number from my mobile or from somewhere else, the phone rings, but nobody answers. So the caller does not get charged. The router already sees enough from the D-channel and starts the dial. Then after a few seconds it uses &lt;code&gt;wget&lt;/code&gt; to push the fresh public IP to a small web server and to a dyns provider. The dyns name now points to the current address.&lt;/p&gt;
&lt;p&gt;For me this is so good because it is made from almost nothing. Just log file watching and a few commands.&lt;/p&gt;
&lt;h2 id=&#34;why-the-dyns-update-matters&#34;&gt;Why the dyns update matters&lt;/h2&gt;
&lt;p&gt;The line does not have a permanent public IP. So it is not enough to only bring the connection up. I also need to know what the new address is or have some name that points to it.&lt;/p&gt;
&lt;p&gt;The second part of the hack is therefore the &lt;code&gt;wget&lt;/code&gt; update.&lt;/p&gt;
&lt;p&gt;I push the address to two places:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;one tiny helper page on a web server I have access to&lt;/li&gt;
&lt;li&gt;one dyns provider with a made-up service name and simple update URL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The dyns side is the practical one. If it updates correctly, then I can use the hostname from outside and I do not care what IP I got this time.&lt;/p&gt;
&lt;p&gt;The helper page is more for me. I can look there and check if the update happened and which address was sent.&lt;/p&gt;
&lt;h2 id=&#34;small-problems-with-this-solution&#34;&gt;Small problems with this solution&lt;/h2&gt;
&lt;p&gt;Of course it is not all perfect.&lt;/p&gt;
&lt;p&gt;First, the exact i4l log format is not always the same. One version writes a line slightly different than another one. So I try a few grep patterns until it catches the right thing and not random noise.&lt;/p&gt;
&lt;p&gt;Second, if the syslog watcher dies, then the trick is dead. So I put it in a small restart loop. Primitive, but enough.&lt;/p&gt;
&lt;p&gt;Third, timing is a bit ugly. If I call and hang up too fast, sometimes the script catches it, sometimes not. If I let it ring a bit longer, it is more reliable. So I learn how long I need to let it ring.&lt;/p&gt;
&lt;p&gt;Fourth, &lt;code&gt;wget&lt;/code&gt; should not run too early. First the line must be really up. So I just sleep some seconds before the update call. This is exactly the kind of ugly timing thing which I do not love, but it is still better than no solution.&lt;/p&gt;
&lt;h2 id=&#34;why-i-like-this-hack-so-much&#34;&gt;Why I like this hack so much&lt;/h2&gt;
&lt;p&gt;I think the reason is: this is one of the first times I make the machine do something clever only with things I already have.&lt;/p&gt;
&lt;p&gt;No new hardware.
No expensive software.
No giant daemon.
No telephony box.&lt;/p&gt;
&lt;p&gt;Only:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linux&lt;/li&gt;
&lt;li&gt;syslog&lt;/li&gt;
&lt;li&gt;bash&lt;/li&gt;
&lt;li&gt;i4l log messages&lt;/li&gt;
&lt;li&gt;one &lt;code&gt;wget&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the style of solution I really enjoy. It feels a bit improvised, yes, but it is also very direct. The machine says what happens in the log, I listen to it, and I react.&lt;/p&gt;
&lt;p&gt;Also it makes the router suddenly feel more &amp;ldquo;alive&amp;rdquo;. It is not only a passive box anymore. It reacts to the outside world in a small smart way.&lt;/p&gt;
&lt;h2 id=&#34;other-changes-around-this-time&#34;&gt;Other changes around this time&lt;/h2&gt;
&lt;p&gt;I also moved the router from SuSE 5.3 to SuSE 6.4 by now. That means kernel 2.2 and &lt;code&gt;ipchains&lt;/code&gt; instead of &lt;code&gt;ipfwadm&lt;/code&gt;. This is good for the LAN side because helpers like &lt;code&gt;ip_masq_ftp&lt;/code&gt; are there and some ugly protocol stuff becomes less ugly.&lt;/p&gt;
&lt;p&gt;So the box now looks already more grown-up than in the first phase:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SuSE 6.4&lt;/li&gt;
&lt;li&gt;kernel 2.2&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ipchains&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;ISDN dial on demand&lt;/li&gt;
&lt;li&gt;syslog trigger hack&lt;/li&gt;
&lt;li&gt;dyns update with &lt;code&gt;wget&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And still the DSL modem LED is blinking.&lt;/p&gt;
&lt;p&gt;I think this is the most absurd thing: the software side gets more and more finished while the modem still sits there and says &amp;ldquo;not yet&amp;rdquo;.&lt;/p&gt;
&lt;h2 id=&#34;next-things-i-want&#34;&gt;Next things I want&lt;/h2&gt;
&lt;p&gt;The next obvious step is more local services.&lt;/p&gt;
&lt;p&gt;I want:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;local DNS caching&lt;/li&gt;
&lt;li&gt;maybe DHCP from the router&lt;/li&gt;
&lt;li&gt;maybe a web proxy because the line is still not exactly fast&lt;/li&gt;
&lt;li&gt;some ad filtering because web pages are getting more annoying and bigger&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Especially the proxy idea is attractive. If the same stupid banner loads ten times, then I pay for the same stupidity ten times. This is not acceptable.&lt;/p&gt;
&lt;p&gt;So probably the next article is about making the LAN side more comfortable and maybe a bit less wasteful.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Making ISDN Dial-On-Demand Work with SuSE and ipfwadm</title>
      <link>https://turbovision.in6-addr.net/linux/home-router/making-isdn-dial-on-demand-work-with-suse-and-ipfwadm/</link>
      <pubDate>Sun, 14 Feb 1999 00:00:00 +0000</pubDate>
      <lastBuildDate>Sun, 14 Feb 1999 00:00:00 +0000</lastBuildDate>
      <guid>https://turbovision.in6-addr.net/linux/home-router/making-isdn-dial-on-demand-work-with-suse-and-ipfwadm/</guid>
      <description>&lt;p&gt;Now the box is not only booting, it is doing useful work.&lt;/p&gt;
&lt;p&gt;I still have the DSL hardware connected, but the modem LED is still blinking and not stable. So this means: the real life is still ISDN. But because of the T-Online/DSL package I can already use ISDN for internet without this old fear of counting every minute too hard. That makes it much more realistic to really use the Linux router every day and not only as some weekend test setup.&lt;/p&gt;
&lt;p&gt;The main thing I wanted was dial on demand. I do not want the machine online all the time if nobody uses it. Also I do not want manual dial each time. The right thing is: local machine sends packet, router notices it, line goes up, internet works. Later, when no traffic is there anymore, the line goes down again.&lt;/p&gt;
&lt;p&gt;In theory this sounds very logical. In practice it takes me enough evenings.&lt;/p&gt;
&lt;h2 id=&#34;ipppd-and-the-general-direction&#34;&gt;ipppd and the general direction&lt;/h2&gt;
&lt;p&gt;The important parts for me are &lt;code&gt;isdn4linux&lt;/code&gt; and &lt;code&gt;ipppd&lt;/code&gt;. isdn4linux does the low-level ISDN side and &lt;code&gt;ipppd&lt;/code&gt; does the PPP part. After reading enough HOWTO text and trying enough wrong settings I end up with a setup that is at least understandable.&lt;/p&gt;
&lt;p&gt;The main config is not beautiful, but it is mine:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# /etc/ppp/options.ippp0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;asyncmap 0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;noauth
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;crtscts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;modem
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lock
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;proxyarp
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;defaultroute
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;noipdefault
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;usepeerdns
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;persist
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;idle 300
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;holdoff 5
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;maxfail 3&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The important line for me here is &lt;code&gt;idle 300&lt;/code&gt;. Five minutes. That means if there is no traffic for five minutes, the line goes down again. This feels practical. Long enough that browsing is not annoying. Short enough that the box is not just hanging online forever.&lt;/p&gt;
&lt;p&gt;The actual dial and hangup I bind to &lt;code&gt;isdnctrl&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/sbin/ipppd file /etc/ppp/options.ippp0   connect &lt;span class=&#34;s1&#34;&gt;&amp;#39;/usr/sbin/isdnctrl dial ippp0&amp;#39;&lt;/span&gt;   disconnect &lt;span class=&#34;s1&#34;&gt;&amp;#39;/usr/sbin/isdnctrl hangup ippp0&amp;#39;&lt;/span&gt;   ippp0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;When it works the result is nice. First request is a bit slow. The line comes up. Then surfing feels normal enough for that time. Mail works. IRC works. FTP works if it behaves.&lt;/p&gt;
&lt;h2 id=&#34;the-first-click-effect&#34;&gt;The first-click effect&lt;/h2&gt;
&lt;p&gt;One thing is always there and I think everybody who does this knows it: the first click is special.&lt;/p&gt;
&lt;p&gt;If the line is down and a browser tries to fetch a page, sometimes the first request times out before the line is really ready. Then the user clicks reload and now it works because the link is already up. So I keep telling people in the flat: if the page does not come on first try, just click again, the router is maybe still dialing.&lt;/p&gt;
&lt;p&gt;This sounds stupid, but after a week everybody knows it and then it is just normal life.&lt;/p&gt;
&lt;h2 id=&#34;lan-sharing-with-ipfwadm&#34;&gt;LAN sharing with ipfwadm&lt;/h2&gt;
&lt;p&gt;Kernel 2.0 means &lt;code&gt;ipfwadm&lt;/code&gt;. I already heard about &lt;code&gt;ipchains&lt;/code&gt; and I would like to try it, but on this box I am still on SuSE 5.3 with the 2.0 kernel, so for now it is &lt;code&gt;ipfwadm&lt;/code&gt;. The syntax is not exactly poetry, but it works.&lt;/p&gt;
&lt;p&gt;I use masquerading so the local machines can share the one connection. Internal side is private addresses, router has the public side via ISDN, and packets get masked on the way out.&lt;/p&gt;
&lt;p&gt;Minimal direction looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &amp;gt; /proc/sys/net/ipv4/ip_forward
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ipfwadm -F -p deny
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ipfwadm -F -a m -S 192.168.42.0/24 -D 0.0.0.0/0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That is not the full ruleset, only the basic idea. I keep the real script in &lt;code&gt;/etc/rc.d/&lt;/code&gt; and comment it because otherwise I forget the arguments in one week.&lt;/p&gt;
&lt;p&gt;I like that with Linux 2.0 one can still see the whole moving pieces without too much abstraction. On the other hand, things like FTP quickly show where the limits are.&lt;/p&gt;
&lt;h2 id=&#34;ftp-and-the-small-pain-of-old-protocols&#34;&gt;FTP and the small pain of old protocols&lt;/h2&gt;
&lt;p&gt;Passive FTP is mostly okay. Active FTP is not so nice. With &lt;code&gt;ipfwadm&lt;/code&gt; and this generation there is no good helper for it. So active FTP can fail in stupid ways and then you start thinking maybe you broke the router, but in fact the protocol is just doing protocol things.&lt;/p&gt;
&lt;p&gt;After some evenings I decide the simple rule is this: use passive FTP when possible and do not lose time with trying to make old protocol design look smart.&lt;/p&gt;
&lt;p&gt;That is maybe the first moment where running a router teaches me something bigger than command syntax. Many network problems are not Linux problems. They are protocol problems, software expectations problems, or user expectation problems.&lt;/p&gt;
&lt;h2 id=&#34;t-online-and-general-line-feeling&#34;&gt;T-Online and general line feeling&lt;/h2&gt;
&lt;p&gt;The provider side is okay most of the time. Sometimes the line drops for no reason I can see. Sometimes authentication fails once and works on the next try. I keep notes because otherwise every error starts to feel mystical.&lt;/p&gt;
&lt;p&gt;I think this is one important habit I get from this box: write down what happened. Time, symptom, what I changed, what worked. Without this, three evenings of problem solving become one big confused memory.&lt;/p&gt;
&lt;h2 id=&#34;the-machine-itself&#34;&gt;The machine itself&lt;/h2&gt;
&lt;p&gt;The Cyrix Cx133 is doing fine. I already moved it to 16 MB and this helps a lot. 8 MB was really not much. Right now the box is still in the lean stage. No big extra services. Just enough to route and share the line.&lt;/p&gt;
&lt;p&gt;The Teles card still needs respect. If something goes weird, I first check cable and card state before I start blaming PPP. This saves me time.&lt;/p&gt;
&lt;h2 id=&#34;what-already-feels-good&#34;&gt;What already feels good&lt;/h2&gt;
&lt;p&gt;Even now, before DSL is really there, the setup already feels worth it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;one box for the internet edge&lt;/li&gt;
&lt;li&gt;shared connection for local machines&lt;/li&gt;
&lt;li&gt;line comes up only when needed&lt;/li&gt;
&lt;li&gt;config files which I can read and change&lt;/li&gt;
&lt;li&gt;no dependency on one desktop machine being on&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is already much more &amp;ldquo;real systems&amp;rdquo; feeling than just installing Linux on a PC for trying around.&lt;/p&gt;
&lt;p&gt;I still want more from the box. I want DNS cache. I want maybe a proxy. I want some cleaner way to wake the line from outside. Right now if I am not at home and the line is down, then it is down. That is the next problem I want to solve.&lt;/p&gt;
&lt;p&gt;Also the DSL modem is still blinking. It is almost becoming decoration.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>My First Linux Router: SuSE 5.3, Teles ISDN and the Blinking DSL Modem</title>
      <link>https://turbovision.in6-addr.net/linux/home-router/first-linux-router-suse53-teles-and-the-blinking-dsl-modem/</link>
      <pubDate>Sat, 03 Oct 1998 00:00:00 +0000</pubDate>
      <lastBuildDate>Sat, 03 Oct 1998 00:00:00 +0000</lastBuildDate>
      <guid>https://turbovision.in6-addr.net/linux/home-router/first-linux-router-suse53-teles-and-the-blinking-dsl-modem/</guid>
      <description>&lt;p&gt;I wanted to start with Linux already earlier, but I did not. One reason was VFAT. I had too much DOS and Windows stuff on the disk and I did not want to make a big break just for trying Linux. Now SuSE 5.3 comes with kernel 2.0.35 and VFAT support is there in a way that feels usable for me, so now I finally do it.&lt;/p&gt;
&lt;p&gt;Also I have enough curiosity to break my evenings with this, and enough little money to make bad hardware decisions and then keep them running because there is no budget for the nice version.&lt;/p&gt;
&lt;p&gt;The machine for the router is a Cyrix Cx133. Not a fancy box. Right now it has 8 MB RAM and a 1.2 GB IDE disk. The case looks like every beige case looks. For a router it is enough. It boots. It stays on. It has one job. If I find cheap RAM later I will put it in, but first I want the basic thing working.&lt;/p&gt;
&lt;p&gt;For ISDN I do not buy AVM because I simply cannot. Everybody says AVM is the good stuff and the drivers are nice and all is more easy. Fine. I buy a cheap Teles 16.3 PnP card. It is not the card of dreams, but it is my card and I can pay it. So the project now is not &amp;ldquo;what is best&amp;rdquo;, it is &amp;ldquo;what can be made to work with Teles and a bit stubbornness&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;At the same time there is already the whole T-DSL story from Telekom. This is maybe the funny part: I already subscribe to the DSL package together with T-Online, but the line is not switched yet. They give us the hardware. The DSL modem is there. The splitter is there. Everything is there. I can look at the modem and I can connect it and the LED is blinking and blinking and blinking. But there is no real DSL sync yet. It is like the future is already on the desk, only the exchange in the street does not care.&lt;/p&gt;
&lt;p&gt;The good thing in this package is: I can already use ISDN with the same flatrate model through T-Online until DSL is finally active. That changes everything. If I had to pay every minute like in the older ISDN situation, I would maybe not do such experiments so relaxed. But with this package I can prepare the whole router now, use it now, put the DSL hardware already in place, and then just wait until someday the blinking LED becomes stable.&lt;/p&gt;
&lt;p&gt;This is maybe a bit absurd, but also very german somehow: contract ready, hardware ready, paperwork ready, technology almost ready, and then the actual line activation takes forever.&lt;/p&gt;
&lt;h2 id=&#34;why-i-want-a-real-router-box&#34;&gt;Why I want a real router box&lt;/h2&gt;
&lt;p&gt;I do not want one Windows machine doing the internet and all other machines depending on that. I also do not want manual dial each time. I want a separate machine which is just there and does the gateway work. If it works good, nobody sees it. If it breaks, everybody sees it. This is exactly the kind of thing I like.&lt;/p&gt;
&lt;p&gt;Also I want to learn Linux not only as desktop. Desktop is nice, but for me the interesting thing is always when one machine does a service for other machines. Then it gets serious. Then configuration is not decoration anymore.&lt;/p&gt;
&lt;p&gt;The first setup is simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cyrix Cx133 as the router&lt;/li&gt;
&lt;li&gt;Teles 16.3 for ISDN&lt;/li&gt;
&lt;li&gt;one NE2000 compatible network card for local LAN&lt;/li&gt;
&lt;li&gt;SuSE 5.3&lt;/li&gt;
&lt;li&gt;T-Online account&lt;/li&gt;
&lt;li&gt;DSL hardware already connected, but DSL itself still sleeping somewhere in Telekom land&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The LAN side is &lt;code&gt;eth0&lt;/code&gt;. The ISDN side I will configure through the i4l tools once the login part is really clean.&lt;/p&gt;
&lt;h2 id=&#34;installing-suse-53&#34;&gt;Installing SuSE 5.3&lt;/h2&gt;
&lt;p&gt;SuSE installation feels big for a student machine because there are so many packages and YaST wants to help everywhere. But I must say, for this use case it is really practical. I do not want to compile every tiny thing right now. I want the machine up and then I want to start reading config files.&lt;/p&gt;
&lt;p&gt;The nice thing is that SuSE 5.3 already has what I need for this direction:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;kernel 2.0.35&lt;/li&gt;
&lt;li&gt;VFAT support, finally good enough for me to jump in&lt;/li&gt;
&lt;li&gt;isdn4linux pieces&lt;/li&gt;
&lt;li&gt;YaST for basic setup&lt;/li&gt;
&lt;li&gt;normal network tools and PPP stuff&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first days are not so elegant. I reinstall once because I partition stupidly. Then I configure the network wrong and wonder why nothing routes. Then I realize that reading the docs before midnight is much more productive than changing random options after midnight.&lt;/p&gt;
&lt;p&gt;Still, the feeling is strong: this is possible. The machine is not powerful. The card is not luxury. But Linux is not laughing about the hardware. It takes the hardware seriously and tries to use it.&lt;/p&gt;
&lt;h2 id=&#34;the-teles-card-and-the-small-pain-around-it&#34;&gt;The Teles card and the small pain around it&lt;/h2&gt;
&lt;p&gt;The Teles 16.3 works, but not like a nice toy. It works like something you need to deserve first.&lt;/p&gt;
&lt;p&gt;PnP is not really my friend here. Auto-detection is sometimes correct and sometimes not. I get into the usual dance with IRQ and I/O settings, and because the NE2000 clone is also not exactly a model citizen, I must be careful there are no collisions. When it finally stabilizes, I write down the values because I know I will forget them if I do not.&lt;/p&gt;
&lt;p&gt;The card sits on S0 bus with a passive NT. That setup is physically very small. Short cable is important. At first I use a longer cable because it is just the cable I have on the desk. Then I get strange effects. D-channel sync comes, then some weird instability. I shorten the cable and suddenly the whole thing becomes much less dramatic. From this I learn again the old rule: with communication stuff, physical layer problems are always more stupid than the software problems.&lt;/p&gt;
&lt;p&gt;When the ISDN side starts to work the feeling is really good. No modem noise. No analog nonsense. Digital and clean. I know 64 kbit/s is not much in the abstract, but compared to normal modem life it feels fast enough that one can do real things.&lt;/p&gt;
&lt;h2 id=&#34;the-strange-situation-with-the-dsl-modem&#34;&gt;The strange situation with the DSL modem&lt;/h2&gt;
&lt;p&gt;The modem is already on the desk and it is maybe the best symbol for this whole phase. I already have the new thing. I can touch it. I can cable it. I can power it. But it is not mine yet in the practical sense, because the line in the exchange is not enabled.&lt;/p&gt;
&lt;p&gt;So what happens is: I install the splitter, I connect the modem, I look at the LED, and it blinks. Every day it blinks. It is almost funny. It is like the house has a small promise lamp.&lt;/p&gt;
&lt;p&gt;Because we already have the package, I can connect with ISDN under the same general tariff model and prepare everything. This is really useful. It means the whole router is not a waiting project. It is a live project from day one. The DSL modem is there as a future device, but the machine is already useful now through ISDN.&lt;/p&gt;
&lt;p&gt;This also changes my mood when building it. I am not making a theoretical future router. I am making a real working box. If Telekom ever finishes the outside part, then maybe the uplink can change without rebuilding the whole idea from zero.&lt;/p&gt;
&lt;h2 id=&#34;what-i-have-running-now&#34;&gt;What I have running now&lt;/h2&gt;
&lt;p&gt;At this moment I keep it simple. I am still mostly happy that Linux is on the box and the basic line can come up. The stack is not fancy yet. It is more like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SuSE 5.3&lt;/li&gt;
&lt;li&gt;isdn4linux&lt;/li&gt;
&lt;li&gt;T-Online login&lt;/li&gt;
&lt;li&gt;local Ethernet&lt;/li&gt;
&lt;li&gt;a lot of notes on paper&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I already know I want these things later:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dial on demand&lt;/li&gt;
&lt;li&gt;IP masquerading for the LAN&lt;/li&gt;
&lt;li&gt;maybe DNS cache&lt;/li&gt;
&lt;li&gt;maybe Squid if memory allows it&lt;/li&gt;
&lt;li&gt;and if DSL finally comes, then PPPoE and the same box continues&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I do not know yet which part will be the most annoying. Right now I guess the Teles card. Maybe later I will say PPP is worse. Maybe both.&lt;/p&gt;
&lt;p&gt;For now I am just happy that Linux finally starts for me with a version where VFAT is not a blocker anymore, the cheap ISDN hardware is usable, and the blinking DSL modem already stands on the desk like a small challenge.&lt;/p&gt;
&lt;p&gt;Maybe next I write more when the dial-on-demand part is not so ugly anymore.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
