Archive for the 'Linux' Category

Debian Etch Released - Changes to /etc/apt/sources.list

Monday, April 9th, 2007

When my grandfather was a boy, back in the days when everything was black and white, he waited up all night so he could witness the release of Debian Sarge. Now I, too, can say I’ve witnessed the release of that Halley’s Comet of distros, a new Debian Stable…

Debian 4.0 (Etch) became the stable version of Debian yesterday. If you’ve been using Etch prior to this, you will need to add security updates to your sources.list:


#
#  /etc/apt/sources.list
#

#
# etch
#
deb     http://ftp.uk.debian.org/debian/     etch main contrib non-free
deb-src http://ftp.uk.debian.org/debian/     etch main contrib non-free

#
#  Security updates
#
deb     http://security.debian.org/ etch/updates  main contrib non-free
deb-src http://security.debian.org/ etch/updates  main contrib non-free

Running apt-get update you may run into these errors:


W: Conflicting distribution: http://security.debian.org stable/updates Release
     (expected stable but got etch)
W: You may want to run apt-get update to correct these problems

Check your sources.list file again, and explicity use “etch” instead of stable as on some mirrors they don’t seem to be the same thing, yet. Then re-run apt-get update.

Welcome to Debian 4.0!

What’s New
Release Notes
Upgrading from Sarge to Etch

/proc/sys/net/huh?

Saturday, January 13th, 2007

You’ll often come across docs and how-tos that say things like “to enable forwarding issue the following command”:

echo 1 > /proc/sys/net/ipv4/ip_forward

Ever wondered what all that stuff in /proc/sys/net actually does? Ok, a lot of it is pretty logical, but sometimes it’s nice to actually know with a bit more certainty. Today I broke something on a server because I assumed, instead of looking it up. Oops.

There’s a lot of documentation in the kernel sources which is surprisingly accessible to the non kernel hackers among us. First, get yourself a copy of the kernel source if you don’t have one. Take a look in /usr/src. If you don’t see a directory called something like linux-2.6.18, you probably don’t have the kernel source available. If you’re on a debian, ubuntu or other apt-based distro, you can apt-get the source for your kernel:

cd /usr/src
apt-get source linux-image-2.6.18-3-k7

Once your kernel source has downloaded and unpacked, cd into the source directory. You’ll find a directory called Documentation, and inside that a subdirectory called networking. The document we’re looking for in this case is ip-sysctl.txt. Open it in your favorite text editor.

  
/proc/sys/net/ipv4/* Variables:

ip_forward - BOOLEAN
        0 - disabled (default)
        not 0 - enabled

        Forward Packets between interfaces.

        This variable is special, its change resets all configuration
        parameters to their default state (RFC1122 for hosts, RFC1812
        for routers)

  

Have a browse around - there’s quite a bit of other doco. There’s an index file, 00-INDEX that lists what’s what.