Search Results: "Erich Schubert"

24 December 2005

Erich Schubert: Merry Christmas

... and stop that annoying "Xmas" thing. Oh, and I hate all the red santa claus (shouldn't he be caled X-man?) stuff everywhere. Christmas used to be something very different than it is now, you know. Merry christmas, and enjoy what used to be the 'quiet time' of the year: Electronic christmas greeting card

Erich Schubert: What I miss most in firefox

... and why Galeon is still my favourite browser: In galeon I can just paste an URL onto the new-tab button (which is missing by default, isn't it?) and it will open a new tab with that URL. In firefox, nothing happens. This annoys me each time I run firefox.

21 December 2005

Erich Schubert: Scammers - provide them with incorrect data?

I today received another obvious scam. Well, basically any email from a bank referring to PIN and/or TANs (for those poor US bank customers: german banks all use one-time-passwords) is ovisouly scam. Especially when it's a really bad translation... So I wonder whether I, as an intelligent user, should maybe still go to this scammers page - and enter deliberately incorrect data. For example by calling
wget "http://202.129.53.211:8081/postbank/privat/app/submit.php?konto=$RANDOM&pin;=$RANDOM&tan1;=$RANDOM&tan2;=$RANDOM&tan3;=$RANDOM"
Yeah, they probably have to filter their data anyway. But are you sure they can tell "good" from "bad" values apart? How likely do you think I accidentally hit a legitimate users' account number and he might suffer from his account becoming accidentially locked? Does this help the banks to detect this scammer, and filter him somehow (e.g. by saying "invalid PIN" even when it's valid) after enough incorrect tries? Hmm... maybe the banks should provide an API to request invalid account numbers to submit to scammers. Then they could e.g. set a cookie or setup IP filters and fight back these scammers.

Erich Schubert: Ene <em>Meme</em> Muh - und raus kommst du!

I'm Spider-Man:
Spider-Man
85%
Robin
75%
Superman
65%
Hulk
60%
Green Lantern
40%
Wonder Woman
35%
Supergirl
35%
The Flash
25%
Iron Man
20%
Catwoman
15%
Batman
10%
You are intelligent, witty,
a bit geeky and have great
power and responsibility.
Click here to take the "Which Superhero are you?" quiz...

18 December 2005

Erich Schubert: XHTML and CSS compatible workarounds for MSIE bugs

A long time, the common way of working around MSIE CSS bugs was to exploit parser bugs and missing features in it's CSS parser. Recently I read about a cleaner approach; I tested it recently and it seems to work quite well. Judging from the W3C validator, it's compatible with XHTML, too. It's nor perfect, but it probably is the best we can do currently. (And definitely cleaner than the parser-bug-exploits listed before.) The approach is simple: given the string <!--[if IE]> Foobar <![endif]--> in an HTML file, almost any parser will treat this as an comment. Except for Internet Exploiter, which will treat "Foobar" as if it was part of the regular text. Instead of "Foobar", you can load an override stylesheet to work around Internet Explorer bugs. Note that as a side effect, MSIE is not a standards compliant parser for XHTML. ;-) Now for the drawbacks: For comparison, a few of the older tricks in CSS:
body        background-color: red;  
html>body   background-color: green;  
This is 100% valid CSS, and works because Internet Exploder doesn't support CSS 2 child selectors. But you cannot always use this, since you need to know the parent elements name. Note that this can give you trouble with the upcoming Internet Explorer which will likely have support for this selector, but will probably be "compatible" to some of the known MSIE 5/6 bugs.
body  
  voice-family: "\" \""; /* some browsers have a parsing bug */
                         /* and will ignore the following rules */
  voice-family: inherit;
  background-color: green;
 
This abuses an attribute to confuse the CSS parser of some browsers. A real hack, strongly discouraged.

17 December 2005

Erich Schubert: Alexa has interesting stats and graphs

Alexa, obviously owned by Amazon and using Google to power its search function, has interesting graphs on the pageviews and reach of some websites. Interestingly, my personal homepage is now barely in the top million (which I consider impressive), but only the top 100.000 have publicly visible graphs. A very interesting graph I obtained is this: msn.com vs. google.com vs. yahoo.com vs. ebay.com vs. amazon.com So the top three sites are yahoo.com, msn.com and google.com; followed by ebay, passport (what is passport used for except hotmail?) and amazon (English pages only, the worldwide fourth is a chinese search engine). I was really suprised to see MSN and passport that high, I would have expected google to be #1 actually. But I obviously underestimated how many people didn't change the Internet Explorer start page... Unfortunately alexa seems to be broken somehow - around 50% of my requests will result in a blank page I have to reload... and right now, I can't get any graphs anymore. Update: alexa works better now again, and I was pointed to Alexa Top Sites with some more top-ranked sites. Oh, and I wonder how these stats are generated. I first thought they are using click counters in search engines (most likely in google?) but OTOH that wouldn't explain yahoo or MSN being that high...

15 December 2005

Erich Schubert: All Just Another hoaX

The latest buzzword acronym, AJAX, is getting on my nerves. Javascript is not cool. It's an annoying, slow language. If you have ever written code in Python or Ruby or Lua, you'll agree that the syntax and library sucks. Usually I'm annoyed by the long loading times of Ajax, so please use it only where it's absoultely necessary. I agree that google maps is cool, because the alternatives would have been an even slower pure html version, an annoying flash which doesn't work properly (say hello to 'new' yahoo maps) or a very slowly starting java applet. I watched the Ruby on Rails and TurboGears intro screencasts today, because I wanted to find out how these frameworks are like to work with. The part I liked least was then in the turbogears screencast they did that pointless ajax thingy, writing javascript code and such... I liked the template engine of turbogears, python "kid". Thats a really nice XMLish template language. Read: proper XML, XHTML. Ruby on Rails templates had this ancient eperl feeling to me. Also kind of PHP like, but not as worse. In contrast to PHP you can actually parse it. Still, you can't properly validate your XHTML template files. So I'll probably try out TurboGear sometime soon, and if I'm not happy with it maybe Ruby on Rails next. I'm very happy to see these new frameworks for free languages. I heard a lot about Java Frameworks recently, but they all seemed so overengineered, and then there is this Java annoyance... A python or ruby solution is much nicer there.

7 December 2005

Erich Schubert: Debian delivers, yes.

Daniel Stone retorts whether I think that Debian delivers. Yes, I do. It is basically part of the "design" of Debian that it's not updated as often as e.g. Ubuntu. This is a big benefit for servers IMHO. In fact, I'm still running some woody systems. They work fine, so why should I go through the "hassle" (however low this is with Debian) of upgrading?

Erich Schubert: Microsoft doesn't deliver. Again.

Apparently Microsoft has pushed back the beta Test of their upcoming Internet Explorer 7, which was expected to be released today. So Microsoft doesn't deliver. Again. The XBox 360 apparently has heat issues and is crashing a lot for some users. Also it has been said that Microsoft is losing quite some money with each unit sold - they are aggressively trying to obtain market share. "Vista" was stripped of all the interesting features, apparently all that is left is a prettier UI with tons of effects (and requring a DirectX 9 capable graphics board). The big feature enhancements like WinFS will not be included and will take at least one more year to be ready for beta... "Windows Live" and "Office Live" (which are neither Windows nor Office) don't live up to their names either: They are just web-based add-ons, even supporting Firefox, and offering pretty much the same as Yahoo and other portals do as well as an online version of SharePoint apparently. They are a meagre attempt of Microsoft to be not totally left behind by Google when it comes to web applications. Heck, these could (and probably are!) be from some other company that Microsoft just bought. The new office version of Microsoft fancies again mostly a new UI, that will be very different and probably confuse users a lot (especially if they have to alternate between office versions); Microsoft also has the reputation of breaking it's own file format again and again; the new office will use an incompatible file format again. The UI also doesn't help people to give their documents a more semantic meaning (for efficient processing by automatic tools such as desktop search engines), but will be more visually-oriented than ever (i.e. styles such as "headline" which do add a semantic meaning are degraded as "quick styles", whereas the bold- and underline buttons are more prominent than ever - good bye, corporate design!) Microsoft has been promising lots of new stuff recently, but has it showed any? Where is Microsoft Windows for Supercomputers? They are totally under control by Unix and Linux. Linux is gaining on Mobile phones and embedded devices. When was the last time you read about WinCE? Heck, even the WiFi network at Microsoft is now powered by Linux...

5 December 2005

Erich Schubert: Blogger.com sucks - doesn't work with planets

Apparently, blogger.com does a referrer check for images. Therefore, if you have your blog there and it's syndicated to a Planet, all images will disappear. Unless they are cached in your browser, of course... Therefore: don't use blogger.com

4 December 2005

Erich Schubert: One more note on firewalls

Most workstations are well-served with firewall rules like this:
*filter
:INPUT DROP
:FORWARD DROP
:OUTPUT ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
Yes, this is just two rules. Use iptables-restore to load. No need to fire up a complex firewall builder tool for that. ;-) The first input rule enabled loopback traffic, the second allows data traffic for established and related connections (ftp data channels for example). If you want to allow incoming SSH, add
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
Oh, unless of course you want to run filesharing and such. You might want to allow incoming connections on other ports as well.

3 December 2005

Erich Schubert: Filtering BitTorrent

If you are responsible for a network with many "nomadic" users, e.g. students, you'll notice quite often they "forget" to shut down their bittorrent programs. Port filters only work up to a certain amount, so I wanted to try out the "string" match included in recent kernels (e.g. 2.6.14). You'll need iptables 1.3.4, which is not yet in Debian, but you can grab some temp packages from my debian directory. The filter rule I tested was
iptables -I OUTPUT -j DROP -m string --string "BitTorrent protocol" --algo bm --from 0 --to 100
(I don't know if algo bm or algo kmp is more performant, or which performance hit this is going to have on your router. The from parameter could be increased to skip the tcp header, too) Note that you might want to add high-volume "usually good" ports with accept rules in front, like port 80 (www), ssh (22) or mail (25, 465, 110, 995, 143, 993). Be careful with using "state ESTABLISHED", too: the string will be sent over an already established connection, not a new, so this is where you need to apply the filter!

1 December 2005

Erich Schubert: Any good dark themes?

A friend of mine likes dark themes a lot. I tried finding some good dark themes for GTK, but all have been rather disappointing so far. The current icon sets (including Tango) are all designed for a bright, colorful desktop, aren't they? They look somewhat weird when placed on a dark background... Maybe the graphic artists could also do some iconsets that work fine with such themes. (I prefer bright ones though ;-))

30 November 2005

Erich Schubert: Pyroman V0.1 finished

I just finished rewriting an old firewall tool from Perl to Python. Since it's in Python and about firewalling I dubbed it Pyroman. I investigated a dozen of firewall-tools before, including shorewall and firehol. Each had it's stength and its weaknesses. After writing iptables rules in a shell script every now and then for a more complex project (with like 6 networks of which 3 are bridged together) and two dozen of differently configured hosts, NATs, VPN, everything. My predecessor had written a shell script to configure the firewall, but this was really bad to maintain. So I ended up writing a perl application to generate the rules from a modular configuration (read: usually one file per host, containing a perl hashmap) Well, after happily using this script for two years, I dedcided it's about time to rewrite it and document it extensively. I chose python for the rewrite. You can get the result here: Pyroman 0.1.1. The good: The bad: To tease you a little more into testing, here's an example host configuration: ("dmz" is an interface alias - where the web server is connected to -, as are "INT", "DMZ" and "ANY" for clients on these interfaces)
"""
A really simple webserver configuration.
These examples are just boring... ;-)
But without NAT they would be even more boring. ;-)
"""
# web server
add_host(
        name="web",
        ip="10.100.1.2",
        iface="dmz"
)
# offering, well, web service.
allow(
        client="ANY DMZ INT",
        server="web",
        service="www ssh ping"
)
# internal hosts may access FTP, too
allow(
        client="INT",
        server="web",
        service="ftp"
)
# setup NAT
add_nat(
        client="ANY INT",
        server="web",
        ip="12.34.56.80"
)
(Yes, this is a python script. No, you probably won't care to write your configuration in a programming language, will you?)

Erich Schubert: PIDA - a really sweet Python IDE

I just discovered the PIDA python IDE. It's really really nice... What I love best with this IDE: It embeds VIM. The first IDE ever with a reasonable editor within! ;-) You can use other "editors", too, of course. ;-) Actually I didn't use much of the IDE features except the file list, which I could have obtained with dozens of VIM macros as well. And probably I'll continue to use plain VIM mostly. But it's nice to see this development.

29 November 2005

Erich Schubert: SELinux up and running

My "test" boxes (well, they are in fact production systems) are now all up and running SELinux with a "strict" policy and in enforcing mode, after some weeks in "permissive" mode to detect the last missing policy rules (well, maybe I'm still missing something in cron.monthly?) What took most of the time was in fact to write policy for some services or custom applications that didn't have one before. And that I basically was just checking the logs every day to see if some new audit errors had appeared. Oh, and inbetween we completely emptied the server racks and their wiring and redid the room... Just to mention a few things that were "missing": My OpenVPN is running a custom script to update DNS on login and logout, which obviously was missing from the SELinux policy. I'm also using heartbeat to failover between the two firewalls and two mailservers; that policy took me probably one hour (without much previous experience) to write. Then I have another custom LDAP to aliases for a Lotus directory (which hopefully will be replaced by a sane application soon... whoever invented "implicite email adresses" should be shot. Just put all email adresses into the directory, so any app can look them up without trying to guess what your generation rules are... firstname.lastname@domain.tld sounds easy, but what with non-ascii characters?) Anyway, the systems are doing pretty well. Maybe I'm going to enabled SELinux on the web server next. ( (cra-)PHP and typo3 will probably make that more difficult, though...) Oh, and I need to sort out which of my policy changes are local changes, and which I should feed "upstream".

26 November 2005

Erich Schubert: Laptop battery dead

My IBM Thinkpad A31ps main system battery is dead. It won't charge any more, instead the battery light starts flashing. The battery is over three years old, but should still have like half of its original capacity. This sucks. My secondary battery, more useful than having two CD drives I never use, is also down to two thirds, giving me a battery run time of less than 90 minutes. Also other stuff has started breaking, starting with an USB port being damaged, bluetooth that never worked etc. - and the laptop is out of warranty by now. I really need to get myself a new laptop (and especially a lighter one), but I know I'll miss the great 135 dpi display my A31p had... :-( also the built-in prism2.5 11 mBit wireless is excellent, good range. My favourites include the ThinkPad X-series, but there are other options which are less expensive... or at least somewhat nonstandard like the Samsung X1, which has impressive specs, too. Or of course an Apple. Debian really needs something like this "Laptop Mission" Ubuntu had... some free laptops for developers if they help on making the distribution work out of the box on their model. I'd apply right away now. ;-)

24 November 2005

Erich Schubert: Wikipedia wasn't really new - so what is the difference?

Wikipedia wasn't really "new". Wikis have been around before. There were a dozen of encyclopedia attempts around (although maybe not using a wiki, and usually more focussed around a specific field of knowledge), there were huge collaboration applications. I think that Wikipedia just offered the right options for the users at the very right moment, when this "revolution" - people not using the web as a way to 'download' content as much, but to actually publish their very own stuff, taking over content production - was just kicking off, without being too fragmented yet. Today, you'll find dozen of "encyclopedias" for specific parts, who somewhat try to copy the success of Wikipedia, but which maybe was so successful because it didn't put up much restrictions on what it was to be used for... As for the "not new" part - take for example a look at DMOZ.org, which is for example used by Google as datasource for Directory.google.com. This has been around for years (since 1995?), 5 Million verified Links in there, 70k editors just to verify and organize the links (many just taking care of a small part like the links for their home town), and everybody can submit new links. I started being an editor when it had around 2 Million links, and "timed out" due to inactivity when it reached 3 Million. I have the impression (partially of course to the success of search robots like google, who have also "ruined" the directory business for e.g. Yahoo) that growth slowed down horribly the last years a lot. Although the level you could contribute wasn't that different from what e.g. Wikipedia offers. On the one hand it's a shame that great projects like DMOZ get so little attention, but on the other hand e.g. Wikipedia is fantastic, and I'm happy that many people have realized that they can be an active part of the web, not just a content consumer. That there is more to the web than to share music and access pr0n^Wcommercial websites.

22 November 2005

Erich Schubert: More SELinux backporting

I've found a couple of issures with my SELinux backports. One is actually a bug present in sysvinit and cron (at least): The debian/rules makefiles uses dpkg-architecture to detect a Linux system (as opposed to GNU hurd or FreeBSD or Solaris) since SELinux only works on Linux. This code queries the DEB_HOST_ARCH_OS variable via dpkg-architecture, but this variable isn't available on sarge (yet)... When building with either my dpkg backport or by using code similar to the following:
dpkg-architecture -qDEB_HOST_ARCH_OS   dpkg-architecture -qDEB_HOST_GNU_SYSTEM
the packages will actually have SELinux support enabled. I've already filed a bug against sysvinit, but should I also file bugs against logrotate and cron, who apparently use the same code to detect SELinux? (openssh and coreutils have better fallback code than suggested above in place)

Erich Schubert: How to filter ssh scanners

Here's an easy recipe to filter those annoying SSH scanners at your firewall:
iptables -A FORWARD -i ethLRZ -p tcp --dport 22 -m state --state NEW \
        -m recent --set --name SSH
#$iptables -A FORWARD -i ethLRZ -p tcp --dport 22 -m state --state NEW \
#       -m recent --update --seconds 60 --hitcount 5 --rttl \
#       --name SSH -j LOG --log-prefix "SSH_brute_force "
iptables -A FORWARD -i ethLRZ -p tcp --dport 22 -m state --state NEW \
        -m recent --update --seconds 60 --hitcount 5 --rttl --name SSH -j DROP
This configuration will allow up to 5 SSH connections in a 60 second timeframe. This will usually make SSH-scanners go away after their 5th retry, and seriously slow them down otherwise. If you have users who "rightfully" need to do more SSH connections, make them use some VPN, a "safe" source-IP-range, whatever. To protect your firewall host, use INPUT instead of FORWARD. Note that you can also implement port-knocking with the recent match.

Next.

Previous.