Adding or removing virtual server with virtual IP deletes IPv6 gateway

When adding or removing a domain to Virtualmin, the IPv6 gateway line is removed from /etc/network/interfaces on Debian 8. I originally reported this in https://virtualmin.com/node/37237 along with another IPv6 issue. The problem described there was partially fixed. The gateway line still gets removed when any domain is added or deleted in Virtualmin though. Using Virtualmin 4.18 Pro and Webmin 1.760 on Debian 8.

Status: 
Closed (fixed)

Comments

Can you post the before and after interfaces files from your system, so I can see the exact format?

No problem! Files are attached. I added a domain and set "Virtual with allocated IP" for IPv4 and IPv6. It was assigned 98.158.79.144 and 2607:f340:aaab:1::1b from the respective pools defined in Virtualmin.

This seems to be affecting CentOS servers as well. We have Virtualmin 4.18 Pro on CentOS 6.7 with a similar IP setup. I created a new domain in Virtualmin. This time in CentOS the default gateway was still in the config file /etc/sysconfig/network-scripts/ifcfg-eth0 but the default ipv6 route was removed from the route table.

Table before: [root@virtualmin1 ~]# ip -6 route 2607:f340:aaab:8::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 default via 2607:f340:aaab:8::1 dev eth0 metric 1 mtu 1500 advmss 1440 hoplimit 4294967295 default via fe80::219:e8ff:fe67:6bc8 dev eth0 proto kernel metric 1024 expires 1792sec mtu 1500 advmss 1440 hoplimit 64

Table after: [root@virtualmin1 ~]# ip -6 route unreachable ::/96 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable 2002:a00::/24 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable 2002:7f00::/24 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable 2002:a9fe::/32 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable 2002:ac10::/28 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable 2002:c0a8::/32 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 unreachable 2002:e000::/19 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 2607:f340:aaab:8::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 unreachable 3ffe:ffff::/32 dev lo metric 1024 error -101 mtu 65536 advmss 65476 hoplimit 4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295

The webpage didn't treat the route table text very well. I've attached a text file of the route table before and after adding on CentOS.

Ok, I see the bug that causes this, and have implemented a fix for inclusion in the 1.771 or later Webmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.