2

We are setting up an offline/offsite backup server. The purpose is to have it offline and uncontactable from anything. Then, once the cron starts the backup process it will enable the network, backup other servers then disable the network again. (We already have a live always on backup server running daily, this will be a failsafe in case of hacks etc)

I have set it up so that can enable and disable via the iwconfig eth0 up/down. The issue is if any power cut or reboots, the network boots enabled. I have tried to disable via an /etc/rc0 (and rc5) script to disable the network, but it seems to turn back on again. I also tried in /etc/network/interfaces "iface eth0 inet manual" which turns off the network at boot, but I can't seem to find a way to turn it back on again.

Any advice, which would achieve our goals?

3
  • What distro and version? It may matter.. Apr 22, 2016 at 16:29
  • This is running ubuntu 16.04, thanks
    – Wardy277
    Apr 23, 2016 at 9:23
  • What is the reason you use iwconfig to bring the interface up and down?
    – rda
    Apr 30, 2016 at 13:26

1 Answer 1

3

When you configure your eth0 interface in /etc/network/interfaces you need to use ifup and ifdown to bring it up and down. These commands are used to configure (or, respectively, deconfigure) network interfaces based on interface definitions in the file /etc/network/interfaces.

Bring eth0 interface up:

ifup eth0

Bring eth0 interface down:

ifdown eth0
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .