19 Feb 2007, 23:27

Comments Off

Example in JBoss’ Getting Started manual

So if you were, like me, searching for the right code as the manual states in chapter 3, don’t go to the URL in the manual but go to here instead. And scroll down! The V4 stuff has a separate “code” package that you need to download. Kinda stupid that they didn’t update the links in the manual, but there you are.

Oh and if they shot the inventor of XML-in-config-files, please send me a note so I can make that day a National Holiday. XML is fine for machines but far to unreadable for mere humans.

16 Feb 2007, 11:18
Tags:
Comments Off

The evolution of BS

The Seanachai, my favourite podcast, talks about St. Valentine’s Day and makes some striking observations:

“[...] Anyway, pope Gelato described Saint Valentine as ‘among those whose names are justly revered among men, but whose acts are only known to God’. From this we can deduce two facts. One: Bullshit had fully evolved by the late fifth century.”

Go listen if you want to hear more.

Tags:

10 Feb 2007, 11:58

Comments Off

Flushing iptables

Note to self: Don’t run ‘iptables -F’ on a node when the default iptables policy is REJECT.

8 Feb 2007, 16:16

Comments Off

Debian, ferm, vsftpd, NAT and passive ftp

I just had a terrible time trying to figure out how to enable passive ftp to a vsftpd in a NAT. So I decided I’d probably help someone if I documented the steps needed to get this to work.

First of all, the firewall is configured with ferm. It’s on your NAT gateway, of course. Configure a NAT as you would normally and then make a forwarder using the example from the ferm manpage. I changed it a bit since I don’t want to forward on an interface, but on an IP address:

def &FORWARD_TCP($inc, $proto, $port, $dest) = {
        table filter chain FORWARD interface ethZ daddr $dest proto $proto dport $port ACCEPT;
        table nat chain PREROUTING daddr $inc proto $proto dport $port DNAT to $dest;
}

# Forward ftp to the internal ftp server
&FORWARD_TCP(x.x.x.x, tcp, ftp, y.y.y.y);

Replace ethZ with the interface that contains the public IP address. Keep in mind that if you use aliases (ethZ:0 or something like it), you need to specify the actual physical NIC device (ethZ). Also, replace x.x.x.x with the public IP address by which someone needs to connect to the FTP server. And replace y.y.y.y with the internal address of the FTP server.

Now, load the connection tracking modules into the kernel. THIS IS IMPORTANT!

modprobe ip_conntrack_ftp
modprobe ip_nat_ftp

The last part is the easiest, disable SSL connections in vsftpd. You can’t do this with encrypted connections, because than ip_conntrack_ftp will not be able to READ the ports it needs to open for the client! There is no way around this, as far as I know. (Except of course, not using FTP at all… Which is why we prefer SCP… But that’s a whole other story.)

Add this to you vsftpd.conf:

ssl_enable=NO

Also, be sure to NOT use the pasv_address directive in your vsftpd.conf! It sounds like something you want, but trust me, you do not want it enabled :)

That’s it, this works for me :)

Technorati tags:

8 Feb 2007, 13:34

Comments Off

Tools are amplifiers

[Talks about cabinet makers] … “Let’s imagine now that because of this scintillating description I’ve given you about the hobby of cabinet making, you’ve decided that that’s now going to be your mission in life: You want to do that! And you want to do that as quickly as possible.

Now today, [you] know nothing about this skill, but who cares? This weekend [you]‘re going to go down to [you favourite DIY store] and [you] spend ten thousand dollars on power tools. Now… we’re idiots with power tools. It hasn’t made us any more skilled, it just made us… more dangerous.

And we see this in project work all the time. — Barry Flicker, Slashing Project Time and Costs (on IT Conversations)

He’s talking about project management tools. I really like this description.

8 Feb 2007, 12:22
Tags: , ,
1 comment

Huisje zoeken (4)

We hadden een heel leuk huisje gevonden. Echt, we zagen het allebei meteen zitten. Mooie keuken, van alle gemakken voorzien. Een woonkamer die groot genoeg is voor ons, met een vloer van siergrind, ideaal eigenlijk voor ons met Aag, aangezien dat makkelijk schoon te houden is. Een ruime tuin, genoeg plaats voor een kennel, overdekt terras, aangrenzende garage waar je droog kunt komen vanwege de overdekking. Elektrische garagedeur, siergrind in de garage (de vorige eigenaar had van de garage een klusruimte gemaakt). Een grote slaapkamer, een extra slaapkamer (waar we de kleerkast wilde zetten, zodat we een groter bed konden aanschaffen), badkamer met ligbad (niet ideaal om te douchen, maar overleefbaar). Et cetera, et cetera. Het was je waarschijnlijk wel opgevallen dat ik in verleden tijd aan het praten ben.

De verkoper vond dat we binnen twee weken moesten laten weten of we de financien rond kregen. Het nadeel van een eigen bedrijf is dat banken altijd een heel stuk moeilijker doen over een hypotheek. Het is niet een kwestie van je inkomen bewijzen, banken willen de cijfers hebben van de afgelopen drie jaar, een prognose, een gesprek met de accountant over hoe onze toekomst eruit ziet, een gemiddeld hoog inkomen over de afgelopen drie jaar, etc. etc. Daarnaast wordt mijn inkomen maar voor 75% gerekend. Dat is het nadeel van een eigen bedrijf. Gisteren verliep de deadline en de bank kon nog geen antwoord geven op onze vraag of wij een hypotheek kunnen krijgen. Het zag er goed uit, maar we hadden nog geen definitief antwoord. Dus moesten we beslissen of we ja of nee zouden zeggen. Onze accountant heeft van de twee weken nog drie kunnen maken (normaal heeft hij zes weken nodig!), maar meer wilde de verkoper absoluut niet over praten.

Het nadeel van ja zeggen als blijkt dat je het achteraf toch niet kunt doen, is dat je dan verplicht 10% van de aankoopsom moet betalen aan de verkoper. Dat is meer dan €15.000,-. Ik weet niet wat jij op je spaarrekening hebt, maar Monique en ik komen bepaald niet aan dat bedrag. Dus ook al zag het er erg goed uit, we hebben besloten dat we geen risico van €15.000,- wilden lopen. De verkoper wilde niet horen over extra tijd, dan zou hij naar de volgende geïnteresseerde gaan, want die waren er genoeg.

Afgelopen dinsdagavond hebben Monique en ik er dus lang over gepraat, de voor en nadelen tegen elkaar opgewogen en besloten dat we het risico niet willen lopen. De schuld ligt in onze ogen uiteraard bij de verkoper, die zo ongeduldig is. Het was een hele moeilijke beslissing, want we keken er echt naar uit om eindelijk samen te wonen en ons eigen huisje te hebben. We vonden het huisje echt ideaal.

“Vonden”, verleden tijd. Dinsdagavond hebben we samen nog even op internet gekeken naar andere huizen. Er zijn er nog genoeg, tegen interessante prijzen en misschien wel meer op ons gericht dan het huisje waar we zo onze zinnen op gezet hadden. Dinsdag gaan we alweer kijken naar een volgend huisje. Dit huisje viel ons dinsdagavond echt op als eigenlijk beter dan het huisje wat we aan het kopen waren.

Er zit nog een klein staartje aan. De verkoper zou contact opnemen met de volgende koper, maar er kwam al meteen achteraan dat als die het huisje niet meer wilde, hij terug bij ons zou komen en we twee weken extra zouden krijgen. We hebben uiteraard gezegd dat hij dat huisje ergens kan steken waar de zon niet schijnt. Als hij ons gewoon een week extra had gegeven, dan was alles geregeld. Maar daar was hij te ongeduldig voor. Ik hoop dat die andere partij het huisje niet meer wil en dat het nog twee maanden te koop staat.

Tags: , ,

5 Feb 2007, 22:20

Comments Off

DRBD0.8 setup on Debian Etch

Pff, spend some hours trying to get DRBD working *again*. The thing is, if you get something like “HaveNetConfig” or when you try to make the filesystem you get that the device is not a valid blockdevice or size cannot be determined, remember to make your drbd disk primary first. Documentation for drbd0.8 is very scarce at the moment, so I’m putting it on my blog:

drbdadm -- -o primary all

This will make the current node primary and voila, you can do:

mkfs.ext3 /dev/drbd0

Which is what I wanted to do in the first place. Also, if the system doesn’t seem to create it’s own device, try

mknod /dev/drbd0 b 147 0

Good luck to you all! Pity Debian decided to leave drbd8 out of Etch :(

1 Feb 2007, 18:40
Tags:
Comments Off

Puppet, debian and update-alternatives

One way to solve it would be:

define check_alternatives($linkto) {
  exec { "/usr/sbin/update-alternatives --set $name $linkto":
    unless => "/bin/sh -c '[ -L /etc/alternatives/$name ] && [ /etc/alternatives/$name -ef $linkto ]'"
  }
}

Use it as:

# We want to use pinfo as infobrowser
check_alternatives { "infobrowser":
  linkto => "/usr/bin/pinfo"
}

Can probably be done better, but this works for me :)

Tags:

 
  • Search


  • Calender

    February 2007
    M T W T F S S
    « Jan   Mar »
     1234
    567891011
    12131415161718
    19202122232425
    262728  
  • Twitter

    Powered by Twitter Tools

  • RSS Delicious feed

  • Archives