linux

Building a debian firewall on a CF card

I currently have an OpenBSD firewall running on an ancient 586. I have a mini-itx board, CF/IDE converter and a CF card and have been intending to upgrade.

However - rather than OpenBSD I'm going to try for debian (since I know that much better).

This post will end up being a "how I did it" - but at the minute is just a collection of the notes I'm grabbing for now.

mplayer and rtc

mplayer works best with the real time clock (rtc) device /dev/rtc. It also wants to be able to set frequency up to 1024 as a user.

First make sure the rtc module is loaded - one way is to add rtc to /etc/modules

Now - lots of places I see the recommendation to add

echo 1024 > /proc/sys/dev/rtc/max-user-freq

to your startup scripts. I've never been sure where to hack this in - and the people who are giving the advice have many different suggestions. The whole thing feels like a bad hack.

So - after some investigation - I feel that it is much better to use sysctl - by adding the following to /etc/sysctl.conf

Technorati Tags:

Copying partition contents with tar

Note to self - here's the tar command you keep having to lookup

cd /path/to/source
tar lcvf - .|(cd /path/to/dest; tar xpvf - )

Technorati Tags:

Re-generate openssl certificate for apache

Just a note to self - to generate a new certificate

openssl req -new -key /etc/ssl/private/keyfile -x509 -days nnn -out /etc/apache2/ssl/certfile

Technorati Tags:

exim4 - dnslookup - ignore_target_hosts

The dnslookup section of the exim4 config contains

# ignore private rfc1918 and APIPA addresses
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

To allow one specific subnet thru change it:
# ignore private rfc1918 and APIPA addresses
ignore_target_hosts = !192.168.3.0/24 : 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

Here it allows the 192.168.3.x network.

Technorati Tags:

Gnome default browser - under xfce4

Running xfce4 - and have no gnome control panel - but I needed to change the default browser.

gconftool -g /desktop/gnome/url-handlers/http
gconftool -g /desktop/gnome/url-handlers/https

will tell you what is set - in my case "epiphany %s"

I tend to use opera - so

gconftool -s /desktop/gnome/url-handlers/http -t string 'opera -newpage %s'
gconftool -s /desktop/gnome/url-handlers/https -t string 'opera -newpage %s'

did the trick

Technorati Tags:

Adding a new disk with LVM and XFS

This machine is a debian sarge install (2.6 kernel). During installation - it was set up with root as ext3, some swap - and the rest of the disk as an lvm area. All partitions within this area are xfs. All the work was done by the debian installer. Now - we have a new disk which I needed to add.

So - since this is an already running box - the debian installer can't really be used - let's use the actual utilities.

All of the required steps are documented on the LVM HOWTO

First - we need to decide if we are going to use the whole disk or a partition. In this case - the whole disk /dev/hdb. To be able to do this - any existing partition table must be removed

Technorati Tags:

Converting .3gp videos

From this blog information on getting mplayer to play .3gp files:

In /etc/mplayer/codecs - find the section for the videocodec ffh263 (just search for it) and add:

format 0x33363273

Technorati Tags:

XDM shutdown buttons

When using xdm instead of gdm/kdm it's useful to have buttons to allow for shutdown/restart. This is possible using Tcl/Tk and some config tweaks.

Most of the info needed is here:

XDM shutdown buttons

Technorati Tags:

Bluetooth/GPRS

Running a dial-up over bluetooth to a S700i.

Most of this is cargo-culted from the pages listed here - with most of it coming from here.

Installed bluez-hcidump, bluez-pin and bluez-utils.

Used hcidump and sdptool to scan for the device - got the device's id.

bluez-pin worked for me - so I kept that.

Config files.

/etc/bluetooth/hcid.conf - unchanged

/etc/bluetooth/rfcomm.conf

rfcomm0 {
bind yes;
device device_id;
channel 1;
comment "S700i GPRS";

Technorati Tags:
Syndicate content