{"id":2836,"date":"2026-04-11T11:55:06","date_gmt":"2026-04-11T11:55:06","guid":{"rendered":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2836"},"modified":"2026-04-11T11:55:06","modified_gmt":"2026-04-11T11:55:06","slug":"wifibox-fixing-ipv6-connectivity-with-ula-routing","status":"publish","type":"post","link":"https:\/\/hauweele.net\/~gawen\/blog\/?p=2836","title":{"rendered":"Wifibox: fixing IPv6 connectivity with ULA routing"},"content":{"rendered":"<p>While FreeBSD&#8217;s WiFi stack has been improving steadily, it still lags behind Linux. <a href=\"https:\/\/github.com\/pgj\/freebsd-wifibox\">Wifibox<\/a> bridges that gap by deploying a Linux guest to drive a wireless card on the FreeBSD host via PCI pass-through \u2014 and it works remarkably well.<\/p>\n<p>That said, I ran into a connectivity issue: connections to hosts resolving to both IPv4 and IPv6 addresses were silently failing on the IPv6 path. The culprit was IPv6 address selection.<\/p>\n<p>Wifibox relies on ULA (Unique Local Addresses, <code>fd00::\/64<\/code>) for its internal IPv6 routing. The problem is that FreeBSD&#8217;s default <code>ip6addrctl<\/code> policy doesn&#8217;t allow routing to a global unicast address (GUA) when the source address is a ULA \u2014 so the connection attempt would fail or fall back unexpectedly.<\/p>\n<p>The fix is to add a policy entry for the ULA prefix and enable the custom policy in <code>\/etc\/rc.conf<\/code>:<\/p>\n<pre>ip6addrctl_policy=\"AUTO\"<\/pre>\n<p>Then in <code>\/etc\/ip6addrctl.conf<\/code>:<\/p>\n<pre>\r\n# enable selecting GUA destination with fd00::\/64 as source address\r\nfd00::\/64 37 1\r\n\r\n# default automatic policy (IPv6 preferred)\r\n::1\/128          50  0\r\n::\/0             40  1\r\n::ffff:0:0\/96    35  4\r\n2002::\/16        30  2\r\n2001::\/32         5  5\r\nfc00::\/7          3 13\r\n::\/96             1  3\r\nfec0::\/10         1 11\r\n3ffe::\/16         1 12\r\n<\/pre>\n<p>This is a direct follow-up to my previous post <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=2835\">IPv6 address selection and cross-site ULAs<\/a>, which covers the underlying mechanics in more detail.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While FreeBSD&#8217;s WiFi stack has been improving steadily, it still lags behind Linux. Wifibox bridges that gap by deploying a Linux guest to drive a wireless card on the FreeBSD host via PCI pass-through \u2014 and it works remarkably well. &hellip; <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=2836\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[389,1220,164,1215,1221,1224],"class_list":["post-2836","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-freebsd","tag-ip6addrctl","tag-ipv6","tag-networking","tag-ula","tag-wifibox"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2836"}],"version-history":[{"count":0,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2836\/revisions"}],"wp:attachment":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}