Nico Golde: fail2ban + dns = fail
fail2ban is used by many people to prevent certain types of DoS attacks. I use it myself to reduce trackback spam a little bit.
While this tool becomes quite handy in such situations it is also not generally recommend because you can shoot yourself in the foot. If one of the used filters has a bug and results in incorrect parsing your fail2ban installation might end up banning arbitrary IP addresses or even your own IP range (not even mentioning IP spoofing).
There existed at least two bugs of this kind to my knowledge and since regex might not always be easy I'm sure there will be more in the future.
Since I didn't want to look for a specific regex bug in one of the filters I thought about IP spoofing again and looked at fail2bans filters. What I needed was a filter processing log entries of a service listening on a UDP socket as TCP/IP spoofing over the internet doesn't really work well these days. Finding such a filter would mean an instant win situation. To my surprise there is such a filter: config/filter.d/named.conf
This filter is used to parse log entries consisting of denied DNS queries produced by bind. Interestingly there is even an article at debian-administration describing how to setup fail2ban to mitigate a DNS DDoS attack. This is of course a bad idea and I have no idea why this filter is shipped in a default fail2ban installation. DoSing abritary IP addresses with this filter in use becomes as easy as firing up scapy and querying the server with a forged source IP:
>>> send(IP(dst="81.169.172.197",src="xx.46.63.71")/UDP()/DNS(rd=1,qd=DNSQR(qname="foao.modprobe.de")))
.
Sent 1 packets.
This ends up as:
May 26 22:32:22 modprobe named[30245]: client xx.46.63.71#53: query 'foao.modprobe.de/A/IN' denied
in the bind logs which in turn results in:
2010-05-26 22:32:05,551 fail2ban.actions: WARNING [named-refused] Ban xx.46.63.71
In this example the spoofed IP was xx.46.63.71 which is not under my control.
Mission statement: don't use fail2ban unless you really want to shoot yourself in the foot or know pretty well what you're doing
While this tool becomes quite handy in such situations it is also not generally recommend because you can shoot yourself in the foot. If one of the used filters has a bug and results in incorrect parsing your fail2ban installation might end up banning arbitrary IP addresses or even your own IP range (not even mentioning IP spoofing).
There existed at least two bugs of this kind to my knowledge and since regex might not always be easy I'm sure there will be more in the future.
Since I didn't want to look for a specific regex bug in one of the filters I thought about IP spoofing again and looked at fail2bans filters. What I needed was a filter processing log entries of a service listening on a UDP socket as TCP/IP spoofing over the internet doesn't really work well these days. Finding such a filter would mean an instant win situation. To my surprise there is such a filter: config/filter.d/named.conf
This filter is used to parse log entries consisting of denied DNS queries produced by bind. Interestingly there is even an article at debian-administration describing how to setup fail2ban to mitigate a DNS DDoS attack. This is of course a bad idea and I have no idea why this filter is shipped in a default fail2ban installation. DoSing abritary IP addresses with this filter in use becomes as easy as firing up scapy and querying the server with a forged source IP:
>>> send(IP(dst="81.169.172.197",src="xx.46.63.71")/UDP()/DNS(rd=1,qd=DNSQR(qname="foao.modprobe.de")))
.
Sent 1 packets.
This ends up as:
May 26 22:32:22 modprobe named[30245]: client xx.46.63.71#53: query 'foao.modprobe.de/A/IN' denied
in the bind logs which in turn results in:
2010-05-26 22:32:05,551 fail2ban.actions: WARNING [named-refused] Ban xx.46.63.71
In this example the spoofed IP was xx.46.63.71 which is not under my control.
Mission statement: don't use fail2ban unless you really want to shoot yourself in the foot or know pretty well what you're doing
At
Long time ago I stopped using Chrome for daily use and leave it only for my Google services like Gmail and Wave.
Now, is my main browser even when it just stop working while I m offline (weird thing, btw). Is fast, starts fast, loads fast, runs javascript very fast. I can use websites as apps without installing another app to complement my browser like
Mark Zuckerberg apparently recently promised
I was about to close down a good day of hard work, a heavy but useful day... I had even decided to take some time off to listen to some good music, and was heading off to bed on a good mood...
Until I decided to read my contacts' latest rants. And I found very sad news - again.

From
SSH is definitely one of my most often used tools, not only for system
administration at work but also on the road with my netbook, an
Six months ago, I was talking with Kat. We were talking about talking.
On imperfection
Kat wrote:
As a part of my
Yes, there is something like an 'RFH', or 'Request For Help', in the
WNPP in Debian, but I thought I'd go through this blog, first, since I
believe many more people who will feel inclined to help here will read
this blog.
I've been maintaining the beid packages in Debian since, eh, quite a
while now; and while it's not always been the package that I have spent
the most time on, it's not a package that I want to give up.
However, in recent times, I've had issues with the code. I've not
really been able to get the 3.5.2 release to compile properly as a
package, which means that for the moment, squeeze is still stuck with a
2.x release. This is a problem, since that old release isn't supported
anymore upstream, and what's worse, it does not support newer-issued eID
cards. So if your card is less than about two or three years old, you
can't even use it anymore. For this reason, the beid packages really,
really should be updated before squeeze releases.
I've been trying to spend some time doing so, but real life kept
intervening. And I haven't even been able to start looking for the 3.5.3
code that I'd heard rumours would exist.
So, this is a request for help. If you want a more recent beid
package to appear in Debian (and, by extension, Ubuntu) any time soon,
and you can spare some extra time on maintaining a somewhat convoluted
package, you'd be an ideal candidate for comaintainer of this package.
You don't need to have any experience working on Debian, but you do
need experience with build systems and Makefiles. If you don't have any
experience in working on Debian, but would like to learn, this might be
an interesting opportunity. If you do have experience working
on Debian and are as interested as me in getting this to be up-to-date
in the next Debian release, your help would be very much
appreciated. Even if you only have time for a little while and would
like me to take over once everything is going fine again, that's
helpful.
At any rate, if you want to help, contact me at wouter@debian.org.
We'll work out the specifics then.
Thanks in advance,
Google has had a very nice idea today, to celebrate Pacman s aniversary: they made their logo become a playable