Static IP setup
In Debian OS (the appliance is based o it) , network interface settings are primarily managed within the /etc/network/interfaces
file and the /etc/network/interfaces.d/
directory, which can contain additional configuration files. Here, you define your network interfaces and specify how they should obtain an IP address, among other settings.
Execute everything under root user or under sudo
example configures the eth0
interface to use DHCP to obtain an IP address automatically (default in Virtual Appliance).
vi /etc/network/interfaces
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
For a static IP configuration, you would specify the address, netmask, gateway, and possibly DNS nameservers.
vi /etc/network/interfaces
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
After editing your network configuration files, apply the changes using the ifdown
and ifup
commands. These commands deactivate and reactivate your network interface, respectively.
ifdown eth0 && ifup eth0
For the new network settings to take effect, you may also restart the networking service entirely.
systemctl restart networking
More info: man interfaces
or How To set static IP on a Debian Linux.