[Novalug] Service start-up order with bridged ethernet in Ubuntu 9.10
larkoc at iges.org
Tue Mar 16 12:57:29 EDT 2010
Two quick ideas come to mind.
One is to cd /etc/rc3.d (or whatever run-level, 3 or others) and rename the symlinks so that the
SnnService (example S16ssh) has a start number greater than the start number for that of the bridge.
So if bridge starts as /etc/rc3.d/S22MyBridge then make ssh function /etc/rc3.d/S23ssh.
Second is to start those functions even later in the /etc/rc.local file.
> I have an Ubuntu 9.10 server machine that acts as the gateway and VPN
> access point for a small LAN. It has two real ethernet interfaces and
> a virtual layer 2 bridge interface so that openvpn clients can access
> the network using bridged ethernet mode (see contents of
> /etc/network/interfaces below). In addition to openvpn, the server
> runs bind9, dhcp3-server, sshd, ntpd, and apache2. These services are
> configured to listen only on the bridge interface's IP address,
> 10.yy.yy.1 (the LAN side of the gateway).
> All of this works great, except when the machine is first booted:
> some of the daemons attempt to start before the bridge interface is
> up. They try to bind to the bridge's IP address--which doesn't exist
> yet--and fail. I have to manually start the failed services
> afterwards, which is mildly annoying because sshd is one of them and
> the machine usually has no monitor or keyboard attached. I've been
> lucky so far, but I just know that we'll experience a UPS-draining
> power outage a few hours before I realize that I had forgotten a file
> while out on travel and need to use the VPN to get it :-)
> Does anyone know of a good way to make the services start after the
> bridge interface is up? Is there an additional "Required-Start" entry
> that needs to be added to the /etc/init.d scripts for bridges, beyond
> auto lo
> iface lo inet loopback
> # External LAN interface
> auto eth0
> iface eth0 inet static
> pre-up /etc/configureFirewall.sh
> address 10.xx.xx.2
> gateway 10.xx.xx.1
> netmask 255.255.255.0
> # Internal LAN bridge interface
> auto bridgeInt
> iface bridgeInt inet static
> address 10.yy.yy.1
> netmask 255.255.255.0
> bridge_ports eth1
> # Internal LAN interface
> auto eth1
> iface eth1 inet manual
> up ifconfig $IFACE 0.0.0.0 up
> up ip link set $IFACE promisc on
> down ip link set $IFACE promisc off
> down ifconfig $IFACE down
> Novalug mailing list
> Novalug at calypso.tux.org
I will now bring you up to speed on the situation.
We know nothing!
There, you are now up to speed.
---Steve Martin as Inspector Clouseau
Pink Panther 2
More information about the Novalug