<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Network — Jürgen Kreileder</title>
	<atom:link href="/articles/category/network/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Software Engineer and Consultant</description>
	<lastBuildDate>Sat, 29 Oct 2016 01:51:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">5303222</site><image><title>Jürgen Kreileder</title><url>/jk-rss.jpg</url><link>/</link><width>144</width><height>114</height><description>Software Engineer and Consultant</description></image>	<item>
		<title>Enabling IPv6 for This Site</title>
		<link>/articles/enabling-ipv6-for-this-site/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Thu, 17 Dec 2009 22:37:07 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[ipv6]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=411</guid>

					<description><![CDATA[In a few days I will start providing this site via an IPv6 address (normal IPv4 support will stay in place, of course). If you should experience problems accessing my blog, please drop me a mail.]]></description>
										<content:encoded><![CDATA[<p>In a few days I will start providing this site via an IPv6 address (normal IPv4 support will stay in place, of course).  If you should experience problems accessing my blog, please drop me a <a href="mailto:jk@blackdown.de?subject=IPv6%20problem%20on%20blog.blackdown.de">mail</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">411</post-id>	</item>
		<item>
		<title>Speedport Routers Eat Your DNS SOA Requests in Modem-Mode</title>
		<link>/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/</link>
					<comments>/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 23:17:37 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[adsl]]></category>
		<category><![CDATA[avm]]></category>
		<category><![CDATA[deutsche telekom]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[modem]]></category>
		<category><![CDATA[pppoe]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[speedport]]></category>
		<category><![CDATA[vdsl]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=358</guid>

					<description><![CDATA[Some years ago I switched to using a Speedport W701V from Deutsche Telekom on my ADSL line at home. I set it up in modem-mode and let a small Linux box handle everything else. This setup had worked fine with other modems but shortly after switching to the Speedport I noticed that my local caching<br />[&#8594; <a href="/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Some years ago I switched to using a Speedport W701V from <a href="http://www.t-home.de/">Deutsche Telekom</a> on my ADSL line at home.  I set it up in modem-mode and let a small Linux box handle everything else.  This setup had worked fine with other modems but shortly after switching to the Speedport I noticed that my local caching DNS server didn&#8217;t work correctly anymore.  I didn&#8217;t really connect the dots at this point, though.</p>
<p>That happened a few days later when I tried to use Apple&#8217;s <em>Back to My Mac</em> — it just didn&#8217;t work.  After some network tracing I found out that the Apple machine sent DNS SOA requests but never got a reply back.  It turned out that all SOA request got blocked somewhere.  Sending requests to my own name server (<code>host -t soa blackdown.de ns.blackdown.de</code>) and tracing DNS there showed that no packet ever arrived.</p>
<p>I put the Speedport back into router-mode at this point and, who would have guessed it, SOA requests worked fine again.</p>
<p>After fruitless discussions with Deutsche Telekom support (it was impossible to find anyone who even remotely understood what I was talking about) and sending a bug report to <a href="http://www.avm.de/">AVM</a> (the 701V actually is a FRITZ!Box) which never got an answer, I finally solved the problem by putting a <a href="http://trac.freetz.org/">Freetz</a> firmware on the Speedport.  This firmware had an option to disable the <em>PPPoE-Filter</em>.  After disabling the filter the device worked flawlessly in modem-mode.</p>
<p>Now, a few days ago, I switched to VDSL and got a new router: a Speedport W920V.<br />
First thing I did was to put it into modem-mode.  And there it was again, the DNS SOA problem!</p>
<p>Knowing what the problem was, I found a simpler fix this time:</p>
<ol style="text-align: left;">
<li>Download the configuration from the device</li>
<li>Manually change <code>dnsfilter_for_active_directory = yes;</code> to <code>dnsfilter_for_active_directory = no;</code> in the <code>pppoefw</code> section</li>
<li>Manually change <code>ipnetbiosfilter = yes;</code> to <code>ipnetbiosfilter = no;</code> in the <code>pppoefw</code> section</li>
<li>Insert a <code>NoChecks=yes</code> line after the <code>Country=</code>&hellip; line in the header to make the device accept the modified file although its checksum is wrong now</li>
<li>Upload the modified configuration to the device</li>
</ol>
<p>(If you have a local NTP server, you also might want to add it to the <code>server_list</code> in the <code>ntpclient</code> section while editing the configuration of the Speedport.)</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">358</post-id>	</item>
		<item>
		<title>cyrus_sasl patch for Exim 4</title>
		<link>/articles/cyrus_sasl-patch-for-exim-4/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 22 Mar 2005 00:11:32 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/22/cyrus_sasl-patch-for-exim-4/</guid>

					<description><![CDATA[The Exim 4 source code supports authentication with SASL since version 4.43. Debian started enabling this feature in exim4_4.50-2. After I&#8217;ve had upgraded to that version and replaced my saslauthd authenticators with brand-new cyrus_sasl authenticators, I&#8217;ve noticed that auth.log got flooded with entries like &#8216;exim4: OTP unavailable because can't read/write key database /etc/opiekeys: No such<br />[&#8594; <a href="/articles/cyrus_sasl-patch-for-exim-4/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>The <a href="http://www.exim.org/">Exim 4</a> source code supports authentication with <a href="http://asg.web.cmu.edu/sasl/"><acronym title="Simple Authentication and Security Layer">SASL</acronym></a> since version 4.43. <a href="http://www.debian.org/">Debian</a> started enabling this feature in exim4_4.50-2. After I&#8217;ve had upgraded to that version and replaced my <em>saslauthd</em> authenticators with brand-new <em>cyrus_sasl</em> authenticators, I&#8217;ve noticed that <code>auth.log</code> got flooded with entries like &#8216;<code>exim4: OTP unavailable because can't read/write key database /etc/opiekeys: No such file or directory</code>.&#8217;</p>
<p>My exim configuration uses three different <em>cyrus_sasl</em> authenticators and each exim invocation resulted in three of these <abbr title="One-Time-Password">OTP</abbr> warnings because exim calls <code>sasl_listmech()</code> for each configured authenticator. It doesn&#8217;t specify a limiting <code>mech_list</code>, that means SASL will test which of all installed mechs actually can be used for authentication. Debian&#8217;s SASL package includes <code>libotp.so</code>, so it also tries to use OTP which is not configured on my system.</p>
<p>There are two ways to get rid off the warnings:</p>
<ul>
<li>Remove <code>/usr/lib/sasl2/libotp.*</code>. You&#8217;ll have to do this after each upgrade of the libsasl2-modules package.</li>
<li>Rebuild exim with this <a href="/static/exim/71_cyrus_sasl.dpatch">patch</a>. The patch specifies a limiting <code>mech_list</code> option for SASL.  This limits <code>sasl_listmech()</code> to the mechs used in the exim configuration. Other mechs won&#8217;t be tried anymore.</li>
</ul>
<p><em><strong>May 3rd, 2005:</strong> A slightly modified version of the patch has been integrated into Exim CVS and will be included in the next Debian release of exim4 (see Debian bug <a href="http://bugs.debian.org/299743">#299743</a>)</em></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">19</post-id>	</item>
		<item>
		<title>Exim 4 and Dynamic IP-Addresses</title>
		<link>/articles/exim-4-and-dynamic-ip-addresses/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 26 Feb 2005 11:38:29 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/exim-4-and-dynamic-ip-addresses/</guid>

					<description><![CDATA[I&#8217;ve recently changed my network connection at home to a provider which assigns dynamic addresses. Exim always provided a broken HELO/EHLO name to my smarthost since then because my externally visible hostname changes each time I connect. I&#8217;m now using Exim&#8217;s Perl interface to lookup the assigned hostname when connecting my smarthost: /etc/exim4/exim.pl: Don&#8217;t forget<br />[&#8594; <a href="/articles/exim-4-and-dynamic-ip-addresses/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve recently changed my network connection at home to a provider which assigns dynamic addresses. <a href="http://www.exim.org/">Exim</a> always provided a broken HELO/EHLO name to my smarthost since then because my externally visible hostname changes each time I connect. I&#8217;m now using Exim&#8217;s Perl interface to lookup the assigned hostname when connecting my smarthost:</p>
<ul>
<li><code>/etc/exim4/exim.pl</code>:<br />
<em>Don&#8217;t forget to change <code>ppp0</code> to the interface you want to handle!</em></p>
<pre>
#! /usr/bin/perl

# Requires libio-interface-perl

use strict;
use IO::Socket;
use IO::Interface;

sub get_remote_helo_data()
{
    my $s = IO::Socket::INET-&gt;new(Proto =&gt; 'udp');
    my $addr = inet_aton($s-&gt;if_addr('ppp0'));
    my $hostname = gethostbyaddr($addr, AF_INET);

    $hostname = '' if (!$hostname);

    return $hostname;
}
</pre>
</li>
<li><code>/etc/exim4/conf.d/main/50_exim4-localconfig_perl</code>:
<pre>
#main/50_exim4-localconfig_perl
perl_at_start = true
perl_startup = do '/etc/exim4/exim.pl'
</pre>
</li>
<li>Add the following code to the appropriate transport, e.g. <code>remote_smtp_smarthost</code>:
<pre>
helo_data = \
  ${if &gt;{${strlen:${perl{get_remote_helo_data}}}}{0} \
                 {${perl{get_remote_helo_data}}} \
                 {$primary_hostname}}
</pre>
</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4</post-id>	</item>
		<item>
		<title>Mitigating SSH Brute Force Attacks with ipt_recent</title>
		<link>/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/</link>
					<comments>/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 18 Feb 2005 19:16:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=3</guid>

					<description><![CDATA[As my SSH server only accepts public key based authentication, I&#8217;m not really worried about brute force password attacks. But these scans tend to clobber my auth.log. So after some discussion with Andrew Pollock, I&#8217;ve written a few custom actions for my shorewall setup. They use the ipt_recent module which allows to track seen IP<br />[&#8594; <a href="/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As my <a href="http://www.openssh.com/">SSH</a> server only accepts public key based authentication, I&#8217;m not really worried about brute force password attacks. But these scans tend to clobber my <code>auth.log</code>. So after some discussion with <a href="http://blog.andrew.net.au/2005/02/17#ipt_recent_and_ssh_attacks">Andrew Pollock</a>, I&#8217;ve written a few custom actions for my <a href="http://www.shorewall.net/">shorewall</a> setup. They use the <a href="http://snowman.net/projects/ipt_recent/">ipt_recent</a> module which allows to track seen IP addresses and match against them using some criteria.</p>
<p>The <code><a href="/static/shorewall/Limit">Limit</a></code> action can be used to limit accepted connections per IP and timeframe.  The hardcoded limit currently is 6 connections per 60 seconds.  If an IP tries to connect more often, the attempts will be DROPed.</p>
<p>The <code><a href="/static/shorewall/Whitelist">Whitelist</a></code> action provides some simple port-knocking whitelist.  If you know the <code>WHITELIST_PORT</code> and can lift the limits imposed by the <code><a href="/static/shorewall/Limit">Limit</a></code> action for your IP and 60 seconds by connecting to that port.</p>
<p>Here&#8217;s how you can integrate those two actions:</p>
<ul>
<li>Create two empty files:
<ul>
<li><code>shorewall/action.Limit</code>
</li>
<li><code>shorewall/action.Whitelist</code></li>
</ul>
</li>
<li>Copy <code><a href="/static/shorewall/Limit">Limit</a></code> and <code><a href="/static/shorewall/Whitelist">Whitelist</a></code> to the <code>shorewall</code> directory</li>
<li>Add <code>Limit</code> and <code>Whitelist</code> to <code>shorewall/actions</code></li>
<li>Set <code>WHITELIST_PORT</code> in <code>shorewall/params</code>
</li>
<li>Use <code>Limit</code> in <code>shorewall/rules</code>,  for instance:
<pre>
Limit:ULOG:SSH    net  fw  tcp  ssh
Limit:ULOG:IMAP   net  fw  tcp  imap,imaps
</pre>
<p>Note: You <strong>must</strong> use the &lt;action&gt;:&lt;log&gt;:&lt;tag&gt; format for the rules. <code><a href="/static/shorewall/Limit">Limit</a></code> uses the &lt;tag&gt; for the ipt_recent table name.</p>
</li>
<li>Optionally add a <code>Whitelist</code> rule:
<pre>
Whitelist:ULOG    net  fw
</pre>
</li>
</ul>
<p>If you&#8217;re running <a href="http://www.openssh.com/">OpenSSH</a> 3.9 or later, you additionally might want to  set <code>MaxAuthTries</code> to 1 (see <code>sshd_config(5)</code>).</p>
<p><em><strong>May 9th, 2005:</strong> I have found a bug in the ipt_recent module, see <a href="/2005/05/09/fixing-the-ipt_recent-netfilter-module/">this article</a> for more information and a fix.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/mitigating-ssh-brute-force-attacks-with-ipt_recent/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3</post-id>	</item>
	</channel>
</rss>
