IPv6 No Gateway after 2.5 upgrade
-
Oops, and just to update my own post here - my default gateway as reported by netstat was fe80::X:X:X:X%igb0. I was intentionally stripping off the interface specification from the default gateway, but this caused the route not to be detected as the default gateway on the system routing page or by dpinger (globe icon was missing). Leaving the interface appended to the ipv6 address seems to work better. So I now have this instead:
$my_gw = shell_exec("/usr/bin/netstat -rn6 | grep ^default | awk '{print $2}' | tr -d '\n'"); //$rtsoldscript .= "echo $2 > {$g['tmp_path']}/{$wanif}_defaultgwv6\n"; $rtsoldscript .= "echo $my_gw > {$g['tmp_path']}/{$wanif}_routerv6\n"; //$rtsoldscript .= "echo $2 > {$g['tmp_path']}/{$wanif}_defaultgwv6\n"; $rtsoldscript .= "echo $my_gw > {$g['tmp_path']}/{$wanif}_defaultgwv6\n";
Everything now seems fully functional
@mintypickle said in IPv6 No Gateway after 2.5 upgrade:
so thanks to this thread I was able to successfully edit the /etc/inc/interfaces.inc file as described and everything works, but I made a slight change so that it grabs the default gateway from the routing table automatically rather than having to hardcode it into the interfaces.inc file. I did the following:
$my_gw = shell_exec("/usr/bin/netstat -rn6 | grep ^default | awk '{print $2}' | sed 's/%.*//g' | tr -d '\n'"); //$rtsoldscript .= "echo $2 > {$g['tmp_path']}/{$wanif}_defaultgwv6\n"; $rtsoldscript .= "echo $my_gw > {$g['tmp_path']}/{$wanif}_routerv6\n"; //$rtsoldscript .= "echo $2 > {$g['tmp_path']}/{$wanif}_defaultgwv6\n"; $rtsoldscript .= "echo $my_gw > {$g['tmp_path']}/{$wanif}_defaultgwv6\n";
This is working for me and I'm happier with this in case I have to replace my cable modem or something and my ipv6 info changes. Just my 2 cents, hopefully someone finds this useful.
-
@mintypickle The issue looks like its been fixed in the 2.5.1-RCs.
-
Yes, upgrade to the 2.5.1 RC instead.
-
@mintypickle Nice find I'm about to try this, where exactly in the /etc/inc/interfaces.inc file did you add that too? Just anywhere?
-
@spacey it was around line 5142, search for "rtsoldscript" to find the right spot. Or you could upgrade to the latest 2.5.1-RC.
-
here's a patch file if you want to apply it, but as g.shaffer said it's around line 5142
-
@mintypickle I would upgrade to the 2.5.1 RC instead but I'm a bit weary, on the reddit sub there are quite a few posts about how buggy it is outside of this fix. What are your thoughts on it?
-
@mintypickle and how would I apply this patch file? sorry total newb questions
Actually figured that out, found the system patches package -
Should you upgrade to the RC release...I think that's probably one of those questions where if you asked 5 people you'd get 5 different answers. Since the only discernable issue I was having was the ipv6 gateway, and since thanks to this thread I was able to get it to work to my own satisfaction just by editing the interfaces.inc file, I decided against possibly opening other, ickier cans of worms with the release candidate. I know others have updated to 2.5.1-RC with no issues, I just decided not to. I don't have any keener insight than that, sorry!
-
@mintypickle quick question! What do I put for for the Patch Strip Count and Base Directory? I put "/etc/inc/interfaces.inc" there but got an error when saving - "Base Directory must exist and be a directory" any advice?
-
I've never used the patch plugin, I just use the "patch" command from the CLI, either over the console or via SSH, where I would just do the following (assuming you've saved the patch file to /tmp/interfaces.inc.patch. replace with the actual file location as necessary)
cd /etc/inc cp interfaces.inc interfaces.inc_ORIGINAL patch -i /tmp/interfaces.inc.patch
then you will hopefully see output like:
[admin@pfsense.home.arpa]/etc/inc: patch -i interfaces.inc.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- interfaces.inc 2021-03-28 09:42:42.575021000 -0500 |+++ interfaces.inc_MOD 2021-03-28 21:47:11.648202000 -0500 -------------------------- Patching file interfaces.inc using Plan A... Hunk #1 succeeded at 5140. done
If for some reason you can't use the CLI (or don't want to) and you need to use the GUI plugin - as I mentioned before I've never used it, but I assume that you want to use "/etc/inc" as the base directory. Since I created my patch from within /etc/inc and there are no paths included, I would guess that the path strip count doesn't matter.
Good luck!
-
@mintypickle Sweet! that worked! (for the GUI) I put 0 for Path Strip Count and /etc/inc for Base Directory- rebooted and it shows up. With the Globe and IPv6 address- although it has "%igb1" after it, is that how it appears for you as well?
-
Yes...I originally stripped off the interface (the %igb1 part) but the globe icon would not appear without it. Leaving it on there appears to have no adverse effects and the globe icon displays properly so I decided to leave it. If you look at my first post you'll see a sed command where I stripped it off originally, if you wanted to play around with it.
-
@spacey I've had a couple of minor issue that were fixed with the latest RC (2.5.1.r.20210406.1302). I've not had or noticed any other issues. Seems quite stable given my setup.
-
https://redmine.pfsense.org/issues/11800