Ubuntu Server: Networking fails with MODPROBE option in /etc/network/interfaces …

ftpmodprobenetworkingUbuntu

For some reason (which I haven't been able to determine yet), yesterday morning the networking service on our web server (running Ubuntu 8.04.2 LTS — hardy) wouldn't start, and our website went down.

I noticed the following error message when trying to restart it:

* Reconfiguring network interfaces...
/etc/network/interfaces:6: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"
   ...fail!

Line 6 in the /etc/network/interfaces file concerned a MODPROBE command, which (I believe) loaded in the ip_conntrack_ftp module so that I could use PASV on my FTP server (vsftpd): (breaking modprobe commands commented out below)

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
# The loopback network interface
auto lo
iface lo inet loopback
#MODPROBE=/sbin/modprobe
#$MODPROBE ip_conntrack_ftp
pre-up iptables-restore < /etc/iptables.up.rules

# The primary network interface
# Uncomment this and configure after the system has booted for the first time
auto eth0
iface eth0 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.0
    gateway xxx.xxx.xxx.1
    dns-nameservers xxx.xxx.xxx.4 xxx.xxx.xxx.5

I've verified that there is a file in /sbin called modprobe.

Like I said earlier, this setup had been working flawlessly until yesterday morning (though my bosses say that the site actually went down the previous night at 11 PM EST).

Can anyone shed some light on (A) why this broke, and (B) how can I re-enable the ip_conntrack_ftp module?

Best Answer

Can anyone shed some light on (A) why this broke,

I don't think you can just execute modprobe from /etc/networking/interfaces. You need likely need to use the pre-up directive:

From the interfaces(5) manpage:

   pre-up command
          Run  command  before bringing the interface up.  If this command
          fails then ifup aborts, refraining from marking the interface as
          configured,  prints  an  error message, and exits with status 0.
          This behavior may change in the future.

However it is preferable to add the name of the module to /etc/modules so it is loaded at boot time. (Notice that if the command pre-up command fails to execute your interface won't come up - even if the rest of the configuration is perfectly fine).

and (B) how can I re-enable the ip_conntrack_ftp module?

From the modules(5) manpage:

   The  /etc/modules file contains the names of kernel modules that are to
   be loaded at boot time, one per line. Arguments can  be  given  in  the
   same line as the module name. Lines beginning with a ’#’ are ignored.