This page documents what's need to get a Guruplug into a reasonable state, software wise.

This page is a work in progress.

Removing unneeded services

Networking

Here is my network configuration:

Network interface bug

Put this in your startup scripts. This allows hotplug to work, otherwise the kernel will not see a network cable being plugged into a port and thus eth0 won't work get an address via DHCP unless it is plugged in at boot-up time.

ip link set down dev eth0
ip link set up   dev eth0
ip link set down dev eth1
ip link set up   dev eth1

Network autoconfiguration of `eth0` via DHCP

We want to use udev, not ifplugd.

Make ifplugd not start:

update-rc.d -f ifplugd remove

... and use udev instead. In /etc/network/interfaces, put

# /etc/network/interfaces

allow-hotplug eth0
iface eth0 inet dhcp

DHCP/DNS on the subnet

Remove udhcpd. Use dnsmasq instead, since it does DNS+DHCP and is installed anyway:

# /etc/dnsmasq.conf
interface=br0
dhcp-range=192.168.10.100,192.168.10.254
dhcp-authoritative

Static IPs for backup access of interfaces

There may be times I need to ssh into my box but DHCP and DNS are down. Thus, I assign a static IP alias to both of the wired interfaces:

# /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
    address 192.168.255.254
    etwork 192.168.255.0
    netmask 255.255.255.0
auto eth1:1
iface eth1:1 inet static
    address 192.168.255.254
    etwork 192.168.255.0
    netmask 255.255.255.0

Local subnet and bridging startup scripts

brctl addbr br0
brctl addif br0 eth1
# brctl addif br0 uap0
ip link set up dev eth1
# ip link set up dev uap0
ip link set up dev br0
ip addr add 192.168.10.1/24 dev br0
ip route add 192.168.10.0/24 dev br0

iptables -t nat -A POSTROUTING -i br0 -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

/etc/init.d/dnsmasq start

Wireless scripts

to do

DebianNotes/Guruplug (last edited 2010-06-16 09:24:29 by noway)