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
- Remove ftp from /etc/inetd.conf
- use hwclock --systohc
- Unneeded packages:
Change /etc/fstab /var/cache/apt line to mode=0755
Change /etc/fstab: Comment out udev, devpts, and sysfs lines (they are already handled automatically by startup scripts).
Remove the link /etc/udev/rules.d/z60_usbmount.rules to make it not automount USB:
mv /etc/udev/rules.d/z60_usbmount.rules /etc/udev/z60_usbmount.rules.disabled`
Here is my network configuration:
br0 is the NATted subnet. It has DHCP and DNS on it.
eth1, the second interface. Used for wired extensions.
uap0, the wireless AP, when it is enabled. When in wireless client mode, this is not in the bridge.
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