Because the Freebox Pop is an underpowered piece
of crap quite weak when it comes to
NAT'ing anything
above 100Mbps, I decided to get a proper machine and slap
OPNSense on it: I'm paying for the whole fiber, I'm
going to use the whole fiber.
IPv4 was trivial: Firewall -> NAT -> Port Forward, and you're done. It
took me 5 minutes. IPv6 very much not so,
partly because I don't have a clue about IPv6 (and let's be honest, network in
general), partly because it's an almost 30 years old pile of
designed-by-committee RFC.
Amyway, the Freebox Pop is giving me seven /64 prefixes that I can freely
delegate, so for simplicity's
sake and because I'm a lazy punk, I:
wasteuse one for the network between the Freebox and the WAN interface of OPNSense.- use a second one for the LAN
It looks like this:
+──────────+
│ Internet │
+──────────+
│
▼
┌─────────┐
│ Freebox │
└─────────┘
│ prefix A
▼
┌──────────┐
│ OPNSense │
└──────────┘
│ prefix B
▼
+─────+
│ LAN │
+─────+
Apparently, it's possible to not waste a prefix for the network between the Freebox and the router, but in the spirit of modern times, I'm comfortable wasting a significant amount of resources because I couldn't be bothered.
Freebox side
- Open
http://mafreebox.freebox.frin your browser Paramètres de la Freebox->Réseau Local: Mode Réseau->Bridge- Open
http://mafreebox.freebox.frin your browser Paramètres de la Freebox->Connexion Internet: Configuration IPv6- Note the Local link address
- Note the first and second delegate prefixes, eg.
2a01:xxx:xxx:xxx1::and2a01:xxx:xxx:xxx2::. - Disable the
IPv6 firewall, since it's dropping ~everything and can't be configured besides on/off.
OPNSense side
- Open the admin interface
Firewall->Settings->Advanced->Allow IPv6Interfaces->Overview->WANshould contain an IPv6 starting withfe80:: note it down. It's the Local link address of the WAN interface.System->Gateway->Add:Name: FreeboxIPv6GatewayIP Address: IPv6 address of the Freebox in the first delegate prefix,2a01:xxx:xxx:xxx1::1in our caseUpstream gateway: tick the boxMonitor IP: tick the box, if only to be warned/have logsifwhen things go South
Back to the Freebox side
- Open
http://mafreebox.freebox.fr/in your browser Paramètres de la Freebox->Connexion Internet: Configuration IPv6->Délégation de prefixe: add the Local link address of the WAN interface into theNext Hopfield for the first and second prefixes.
Back to the OPNSense side
Interfaces->WAN:Generic configuration->IPv6 Configuration Type, set it toStatic IPv6Static IPv6 configuration->IPv6 address, set it to any IPv6 address present in the first delegated prefix but the one ending in:1since it's already used by the Freebox. I put2a01:xxx:xxx:xxx1::2.IPv6 Upstream Gateway: put the gateway we created, FreeboxIPv6Gateway.
Interfaces->LAN:Generic configuration->IPv6 Configuration Type, set it toStatic IPv6Static IPv6 configuration->IPv6 address, set it to any IPv6 address present in the second delegated prefix but the one ending in:1since it's already used by the Freebox. I put2a01:xxx:xxx:xxx2::2.
And now comes the salt: in IPv4, one would normally use DHCP to assign IP addresses. In IPv6, one can use DHCPv6 or SLAAC+RDNSS!
Anyway, I'm going with SLAAC only and hoping for the best.
Services->Router advertisements->WANRouter Advertisements->Router Only, since I use a fixed IPv6 for the WAN interface of the router, and don't provide network access to anything else on this segment.Advertise Default Gateway, tick the box.
Services->Router advertisements->LANRouter Advertisements->Stateless, and prayAdvertise Default Gateway, tick the box.Adversitse Routes, put the second prefix.
Another (mild) wave of saltiness: you need to punch holes into your firewall to allow incoming traffic for ICMPv6, otherwise things might just break. Fear not, there is a whole RFC about what should normally not be dropped, what will be dropped anyway, what a policy should be defined for, and what should be dropped unless a good case can be made, both for Transit Traffic and Local Configuration Traffic. At this point I just wanted things to work, so I courageously just gave up and trusted OPNSense "Automatically generated rules" to take care of this for me.
Oh, and if you have things like Jellyfin, set the firewall to "conservative", otherwise it'll randomly drop your websocket connections, and you'll waste a whole afternoon debugging it.