EVE-NG Update in IPv6 only environments

The newest eve-ng ( 2.0.6-42(+43+44)-PRO // 2.0.3-108-Community) introduces a lot of cool new features for making your daily work easier than ever, that I will cover in the next few days.

I had some issues while updating my eve-ng (because I run my eve-ng IPv6 only – and yes – v6 ONLY)

If you have v4 only or Dual-Stack, this “problem” is something, that you will not face.
All IPv6 only guys can keep on reading.

During the upgrade, the eve-ng-pro package (I’m sure community does the same) disabled IPv6 since having IPv6 enabled during the update process could break stuff – great for my eve-ng because this way my installation is safe, but bad for my connectivity because if you run IPv6 only like I do – you’ve guessed it – game over for remote access 😀

Here’s how I “rehabilitated” my eve-ng:
Luckily, I have ILO Access to my Server – else, due to COVID-19 and travel “restrictions” this would have been a whole other game…

I opened a Remote Console and logged into eve-ng after giving it some time for the update.
First was a reboot (you should always do this after upgrades).
When it was reachable again, I logged in and looked inside my Syslog file, how ipv6 was disabled.
I found out, that /opt/ovf/ovfstartup.sh disabled ipv6 completely (sysctl -w net.ipv6.conf.all.disable_ipv6=1).

Usually, the script reflects the settings in your /opt/unetlab/html/includes/config.yml (that you edit by setting stuff via web-interface). I’m sure, that this file was changed by the updater from:

#Disable ipv6 on EVE Host
grep -q 'ipv6.*0' /opt/unetlab/html/includes/config.yml 2>/dev/null && sysctl -w net.ipv6.conf.all.disable_ipv6=1
grep -q 'ipv6 ' /opt/unetlab/html/includes/config.yml 2>/dev/null || sysctl -w net.ipv6.conf.all.disable_ipv6=0

to the new “update settings”:

#Disable ipv6 on EVE Host
grep -q 'ipv6.*0' /opt/unetlab/html/includes/config.yml 2>/dev/null && sysctl -w net.ipv6.conf.all.disable_ipv6=1
grep -q 'ipv6 ' /opt/unetlab/html/includes/config.yml 2>/dev/null || sysctl -w net.ipv6.conf.all.disable_ipv6=1

so that regardless of your settings in the web-interface it would make sure, that ipv6 is disabled.

So far so good.

I changed the second line back (grep -q ‘ipv6 ‘ /opt/unetlab/html/includes/config.yml 2>/dev/null || sysctl -w net.ipv6.conf.all.disable_ipv6=0) and rebooted my eve-ng – TADAA – pnet0 has it’s IPv6 address back 🙂

I also modified the script a bit because in IPv6 only networks it would always show you “no ip address on pnet0” on the console instead of your usual “login to http://…..” – after modifying it, it now also shows IPv6 on the console – but the next update will probably break that since I manually edited the file (you shouldn’t do that until you know EXACTLY what you are doing – I repeat – this is NO NO stuff 😛

Here’s what I did:

Change:

IP="$(ifconfig ${INTERFACE} 2> /dev/null | grep 'inet addr' | cut -d: -f2 | cut -d' ' -f1 | grep -E "^[0-9]+.[0-9]+.[0-9]+.[0-9]+$")"

on interface pnet0 to this:

IP="$(ip -o -6 addr show pnet0 | sed -e 's/^.*inet6 \([^ ]\+\).*/\1/' | grep -v ^fe80)"

It still shows /64 behind the URL because I don’t really know how to use awk but hey – it’s a start 😉
The endgame would be to set the URL to https://[2001…..]/ since IPv6 needs braces [ ] in the URL – but that’s just cosmetic.

In the next few days, I will try to upload more Articles and Videos but due to COVID-19, my workload has increased by roughly 900%… Stay Safe guys!

Leave a Reply

Your email address will not be published.

Captcha * Time limit is exhausted. Please reload CAPTCHA.