Search for:

Available article translations:

Customizing network interface configuration in Debian/Ubuntu containers/VMs

Article ID: 115638, created on Mar 4, 2013, last review on May 11, 2014

  • Parallels Cloud Server
  • Parallels Virtuozzo Containers for Linux
  • Parallels Server


Custom network interface settings specified in  /etc/network/interfaces are not applied in Debian-based containers or virtual machines.


Interface configuration in the file /etc/network/interfaces is automatically generated and all customizations are overwritten.
In virtual machines, the file is generated by Parallels Tools.
In containers, it is generated by scripts /etc/sysconfig/vz-scripts/dists/scripts/ in routed mode and /etc/sysconfig/vz-scripts/dists/scripts/ in bridged mode.


To have those custom settings applied upon the interface's activation, the separate interface initialization script should be defined instead.

1. Create /etc/network/if-up.d/additional and specify custom settings there.

[root@debian.ct ~]# cat /etc/network/if-up.d/additional
#!/bin/bash -x
[ "$MODE" = "stop" -o -z "$MODE" ] && exit 0
case "$IFACE" in
eth0) ## custom commands for eth0
      ip route add mm.nn.245.0/24 via xx.yy.19.2 dev eth0
exit 0
[root@debian.ct ~]#

2. Set correct permissions on the script:
chmod 755 /etc/network/if-up.d/additional

ca05eaf5b843fbd53589c90d7228a6df 2897d76d56d2010f4e3a28f864d69223 909d99074e442b52ce54cc7b31cf065d bf1c3a170005eae151f49ba2720abde9 eb0ea3b827d18de2329b6477e24c1d59

Was this article helpful?
Tell us how we may improve it.
Yes No
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0
- Parallels Virtuozzo Containers
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification