Archive for January, 2007

Arptables

Posted in Linux SysAdmin on January 31st, 2007 by Johan Huysmans – Be the first to comment

Everybody know iptables. But do you know arptables?

From the man pages of iptables and arptables:

Iptables  is used to set up, maintain, and inspect the tables of IP  packet filter rules in the Linux kernel.
Arptables is used to set up, maintain, and inspect the tables of ARP packet filter rules in the Linux kernel.

The only difference between these 2 tools is that iptables will filter IP packets and arptables will filter ARP packets. The usage is very simple, if you can work with iptables you can work with arptables, and vice-versa. All commands (Append, Insert, List, …) can be used for both iptables and arptables. The arguments are, off course, different but are very similar in usage.

The package containing arptables is called arptables_jf. I guess the jf stands for Jay Fenlason, which is the name of the writer of arptables.

kickstart: %include

Posted in kickstart on January 28th, 2007 by Johan Huysmans – 2 Comments

Last week I started playing with kickstart. You can read more about it in the howto section of my blog.

Today I was testing the %include command but every file and every path I tried gave me a file not found error.
It appears that just the specific kickstart config file is copied to /tmp and the other content of my usb-disk is nowhere to find. This explains why my included files can’t be found.

The solution is to make your included files available during the %pre-section. This is possible because anaconda will parse the ks.cfg file 2 times. The first time it won’t complain about included files that can’t be found and only the %pre section is executed. The second time it will complain if an include file is missing.

This is how I made my includes work:
* mount the usb-drive during the %pre section

%pre
mkdir -p /tmp/usb-disk-mount/
mount /dev/sda1 /tmp/usb-disk-mount/

* include the files

%include /tmp/usb-disk-mount/partition/base
%include /tmp/usb-disk-mount/network/dummy

My dump script now includes Allrights

Posted in Backup on January 4th, 2007 by Johan Huysmans – Be the first to comment

A new version (v0.6) is now available for download and can be found in the scripts section of my blog (link is at the top of every page).

Besides the dumping of a ldap, mysql and postgresql database and creating a dump of the rpm-package list and the partition table, it is now possible to dump all ownerships and permissions of all files.

This is done by an external script: allrights.pl. More information of this script can be found here.

There are also some minor improvements in the script: The db_dump directory is automatically created and the temporary directory is moved to /tmp and is deleted at the end of the script.

Any comments, remarks, feature-request, success-stories, … are welcome. I appreciate every feedback.