Git Product home page Git Product logo

att-pfsense-ipv6's Introduction

Multiple IPv6 Prefix Delegation over AT&T Residential Gateway for pfSense/opnSense

Known Compatible Versions

  • pfsense (community veresion) - 2.4.5, 2.5.0, 2.6.0
  • pfSense+ - 23.01 - 23.09
  • OPNsense - 21.x, 22.x

Known Kea DHCP Issues

As of pfSense 23.09, Kea DHCP is being pushed as the suggested default for DHCP needs. Kea DHCP works out-of-the-box with this guide. There is some instability with Kea around IPv6 that may prevent the kea-dhcp6 service from starting. For example, the following error message may appear:

DHCP6_INIT_FAIL failed to initialize Kea server: configuration error using file '/usr/local/etc/kea/kea-dhcp6.conf': cannot lock socket lockfile, /tmp/kea6-ctrl-socket.lock, : Resource temporarily unavailable

This can be corrected by deleting the offending /tmp/kea6-ctrl-socket.lock file and restarting the service via Services -> DHCPv6 Server.

Known working residential gateways (RGs)

  • Pace 5268AC
  • Arris NVG599
  • Arris BGW210-700
  • Motorola NVG589
  • HUMAX BGW320-500

Known Caveats

  • Google devices do not support DHCPv6
    • This includes any phone running Android, TV's running Android TV or Google TV, or any Nest product (mini, hub, doorbell, etc). The solution outlined in this readme relies upon DHCPv6. Google devices will not pull a routable GUA (Global Unicast Address), but instead attempt to communicate over the local network via ULAs (Unique Local Address).

All credit goes to the user ttmcmurry from the Netgate Forum for his insight within the thread for which all of this was discussed.

I've been working on this one for a while. This is the result of others posting their work across various forums, reading BSD docs, and plenty of testing as a result of needing something to do while being stuck at home. :)

The purpose of this is to make it easier for AT&T customers who wish to assign more than one IPv6 prefix delegation inside their pfSense firewall to more than one internal network interface. I am providing an example dhcp.conf script and explaining what's needed step-by-step. AT&T customers must have been furnished a Residential Gateway (Pace 5268AC / Arris BGW210-700, possibly others) and have configured the RG in DMZ+/IP Passthrough mode. This has been written with pfSense 2.4.5 in mind.

Why do this? In short, AT&T U-Verse & Fiber customer equipment is assigned a /60 and can only hand out eight /64 prefix delegations. It is not possible to request a larger PD, however it is possible to request multiple /64 PDs from pfSense's WAN interface. Since the pfSense UI does not expose this functionality directly, it is possible to take advantage of it by supplying a dhcp.conf to override pfSense DHCP6 behavior available from the UI.

. . .

Once this script is in place, if you need to reassign interfaces & prefix delegations, the script has to be updated You will need to edit the IPv6 Track Interface Prefix ID on the LAN/OPT interfaces with the IA-PD you specify in the .conf file.

-ttmcmurry


pfSense/OPNsense Configuration Steps

Note: It is assumed that the WAN interface is named "WAN" throughout this guide. If it has a different name in your setup, that is ok. Substitute your WAN interface name where applicable throughout this guide.

#0. Validate Initial Conditions

  1. The WAN interface IPv6 Configuration type is configured for "none"
  2. The WAN interface IPv6 DHCP6 Client Option "Do not allow PD/Address release" is UNCHECKED
    • This checkbox may not be present on some installs
  3. The LAN/OPT interfaces' DHCP6 option is set to "none"
  4. DHCPv6 Server & RA -> DHCP6 Server -> Disabled
  5. Services -> Router Advertisement -> Defaults

Note: Prior to pfSense 23.09, Router Advertisement was found under DHCPv6 Server & RA -> Router Advertisements

#1. Create a local copy of the following config template

interface {YOUR_WAN_INTERFACE} {
	send ia-na 0;
	send ia-pd 0;
	send ia-pd 1;
	send ia-pd 2;
	send ia-pd 3;
	send ia-pd 4;
	send ia-pd 5;
        send ia-pd 6;
	send ia-pd 7;
	request domain-name-servers;
	request domain-name;
	script "/var/etc/dhcp6c_wan_script.sh";
};
id-assoc na 0 { };
id-assoc pd 0 {
	prefix-interface {YOUR_LAN_INTERFACE} {
		sla-id 0;
		sla-len 0;
	};
};
id-assoc pd 1 { 
	prefix-interface {YOUR_OTHER_LAN_INTERFACE} {
		sla-id 0;
		sla-len 0;
	};
};
id-assoc pd 2 { };
id-assoc pd 3 { };
id-assoc pd 4 { };
id-assoc pd 5 { };
id-assoc pd 6 { };
id-assoc pd 7 { };

Note: The script declaration in the above configuration may have a different path depending on the setup. For example, some systems may have the script located at /var/etc/dhcp6c_opt4_script.sh. Ensure that the correct file is referenced either via SSH or through Diagnostics -> Edit File.

#2. Update the "interface" block on line 1

In the config template from step #1, replace {YOUR_WAN_INTERFACE} with the network port name for the WAN interface.

The network port name can be found under Interfaces -> Assignments.

Example:

Screenshot 2023-04-30 at 3 54 24 AM

Screenshot 2023-04-30 at 3 57 09 AM

This results in the following configuration segment:

interface igc3 {
	send ia-na 0;
	send ia-pd 0;
	. . .

IA-NA Note: The IA-NA is an arbitrary number. A unique number must be chosen for each device connected to the AT&T residential gateway (RG) which will request a prefix delegation from the RG. If only one device will be requesting PDs from the RG (i.e. this pfSense firewall), then "ia-na 0" is fine.

#3. Update the "ia-pd" declarations

In the config template from step #1, replace {YOUR_LAN_INTERFACE} with the network port name for the desired LAN interface.

Example:

Screenshot 2023-04-30 at 3 59 32 AM

Screenshot 2023-04-30 at 4 00 36 AM

This results in the following configuration segment:

id-assoc pd 0 {
	prefix-interface igc0 {
		sla-id 0;
		sla-len 0;
	};
};
id-assoc pd 1 { 
	. . .

Network ports can be arbitrarily assigned to PDs, staring with pd 0 and working down the list. Note that formatting is specific. Each new PD declaration needs to be formatted exactly as id-assoc pd 0 is in the above example; only with an updated network port name.

The sla-id and sla-len declarations are always zero (0).

Note: If a particular PD is not desired, it does not need to be declared in the config file. The send ia-pd and its respective id-assoc pd declaration only needs to be declared if it is going to be used by an interface.

Note: Assigned PDs will result in numerically different networks, depending on the RG.

  • Pace 5268AC first assigns F then decrements to 8 to PD 0-7, i.e. PD0 = ::xxxF::/64
  • Arris BGW210-700 first assigns 8 then increments to F to PD 0-7, i.e. PD0 = ::xxx8::/64

#4. Add the script to pfSense

  • Create this file on pfSense under Diagnostics -> Edit File.
  • In the grey filename box, enter /usr/local/etc/rc.d/att-rg-dhcpv6-pd.conf.
    • Ensure there is no trailing space in the filename.
  • Copy and paste your edited script into the text window.
  • Click the Save button

#5. Edit the WAN interface

  1. Navigate to Interfaces -> WAN
  2. Set the IPv6 Configuration Type to DHCP6
  3. Under the DHCP6 Client Configuration section, check the Advanced Configuration box
    • Ensure that the Configuration Override checkbox is unchecked during this portion, as having that box checked will hide UI elements that need to be accessed.
  4. Ensure all other check boxes in this section are unchecked.
  5. Set the DHCPv6 Prefix Delegation size to 60
  6. Re-check the Advanced Configuration checkbox
  7. Enter the path of the configuration override file from earlier into the Configuration File Override text box.
    • i.e., /usr/local/etc/rc.d/att-rg-dhcpv6-pd.conf
  8. Click the Save button and apply the changes

#6. Edit the LAN/OPT interface(s), one at a time

  1. Under General Configuration, set the IPv6 Configuration Type to Track Interface
  2. Under Track IPv6 Interface, set the IPv6 Interface to the WAN interface name
  3. Set the IPv6 Prefix ID to the correlated PD number configured in the configuration file from earlier
  4. Click on the Save button and apply the changes

Example:

Screenshot 2023-04-30 at 3 59 32 AM

Screenshot 2023-04-30 at 4 03 29 AM

Screenshot 2023-04-30 at 4 06 49 AM

Note: Be sure to use the id-assoc pd number associated with the respective network port for the IPv6 Prefix ID.

#7. Enable pfSense DHCPv6 Server

Navigate to Services -> DHCPv6 Server & RA

Perform the following actions for each interface:

  • Within the DHCPv6 Server tab
    • Locate the DHCPv6 Options section
      • Check the DHCPv6 Server
      • Set the desired Range
        • i.e., :: to ::ffff:ffff:ffff:ffff
      • Set the Prefix Delegation Size to 64
    • Click the Save button
  • Within Services -> Router Advertisement
    • Set the Router Mode to Managed
    • Click the Save button

Note: Prior to pfSense 23.09, Router Advertisement was found under DHCPv6 Server & RA -> Router Advertisements

Note: After applying these settings, it may take several minutes for IPv6 addresses to start populating approprately.

If all has gone well, IPv6 should now be working.

State Limits

AT&T Residential gateways have a state table that is far smaller than pfSense's defaults, which can result in problems once the RG begins tracking more states than available. pfSense should be set to never go above that limit. pfSense will adjust how states are managed based on its default adaptive algorithm from "Firewall Adaptive Timeouts." There is no need to adjust pfSense default Adaptive Timeout behavior, only the maximum number of states pfSesnse can use.

The values below are from known hardware & firmware capabilities. Depending on the # of devices directly plugged into the RG, like U-Verse set-top-boxes and devices NOT behind pfSense, you may need to adjust pfSense's maximum states downward. This information can be found on the RG under Settings -> Diagnostics -> NAT.

  • Pace 5268AC - Firmware v11.5.1.532678-att - 15460 states max - Set pfSense to 15000 states
  • Arris NVG599 - Firmware v9.2.2h0d79 - 4096 states max - Set pfSense to 3500 states
  • Arris BGW210-700 - Firmware 1.9.16 - 8000 states max - Set pfSense to 7500 states
  • Motorola NVG589 - Firmware ? - 8192 states max - Set pfSense to 7600 states
  • HUMAX BGW320-500 - Firmware 2.10.6 - 8192 states max - Set pfSense to 7600

Set the pfSense state limit in Advanced -> Firewall & NAT -> Firewall Maximum States

Note: If anyone has more up-to-date information about RG firmware and state capabilities, let me know and I'll update this table.

att-pfsense-ipv6's People

Contributors

jamesmanes avatar lilchancep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

att-pfsense-ipv6's Issues

2.5.0 Compatibility

This currently does not work on pfsense 2.5.0.

At boot pfsense states that it can't find the "wan dhcp script" specified in the config. (Will update as I find more information.)

Clarification in Step #5

On the third step of "Step #5", it originally has us check "Advanced Configuration" but leave "Configuration Override" unchecked. Then, on the 6th step of "Step #5", it says to "Re-check the 'Advanced Configuration' checkbox." Should this NOT be "Now check the previously unchecked 'Configuration Override' checkbox."?

OPNSense DHCPv6 Configuration

Must check the "Manual Configuration" option under each LAN interface configured to track the WAN interface for the DHCPv6 configuration to show up. Otherwise there is no customization available.

route issues on opnsense

routes to LAN interfaces seem to get messed up and pointed to ::1 - this is almost certainly a bug in opnsense itself but with an override config file they are very unlikely to take action

i was able to force the route off of the ::1 destination like so:

route -6 change -net /64 -interface

I havent scripted this in anywhere yet. it seems intermittent like this is a race condition or something.

Add ULA prefixes

This has been working great for me. I'd love to hand out ULA prefixes as well as the GUA ones this script does. Any idea how to do that? I've tried adding as second prefix line to the id-assoc stanzas:

id-assoc pd 1 { # LAN network
   prefix-interface igb0 {
      sla-id 0;
      sla-len 0;
   };
   prefix fdxx::/64 infinity;
};

but it doesn't work

State Limits - Bypass RG

Thanks for the great work, wanted to say that the folks at Netgate seems to have realized the issues with the limited states on the ATT RG and have come up with a innovative feature in their new pfsense+ 23.05, which effectively uses the RG to help authenticate with the ATT network but pulls all the WAN addressing onto the Pfsense itself, bypassing the RG and it's state limitations.

Feature is: "WAN Connectivity with 802.1X Authentication Bridging and VLAN 0 PCP Tagging"

See here:
https://docs.netgate.com/pfsense/en/latest/recipes/authbridge.html#wan-connectivity-with-802-1x-authentication-bridging-and-vlan-0-pcp-tagging

Let me know what you think.

Not an issue but a question: ATT Delegations?

Stumbled upon this while working on something similar (https://github.com/ttickell/opensense-ipv6)

Your config shows you getting 8 /64 delegations from ATT - which I thought I could do, at first. However, I'm now only consistently getting 7 - which is weird, because there's one /64 from a /60 on the modem/router/whatever we call it now, a whole lot of missing /64s, and then I get the last 7.

Are you able to consistently get the 8 /64s from the same /60 prefix?

Thanks,
Ted

Unable to Complete Setup on OPNsense

I'm running OPNsense and was trying to use the guide to set it up. However there are some differences that I'm having issues with. Is it possible to get a OPNsense branch set up with instructions and/or screenshots?

Nevermind: Cancel this. It turns out that with OPNsense, I don't need to do any of this. I just simply have to assign a different IPv6 Prefix ID to each VLAN and the appropriate IPv6 allow rules and it works great!

Getting a little stuck

An amazing guide thank you so much

im getting a little stuck working this through opnsense, I have the file written as

# /usr/local/etc/rc.d/att-rg-dhcpv6-pd.conf
interface re0 {
	send ia-na 0;
	send ia-pd 0;
	send ia-pd 1;
	send ia-pd 2;
	send ia-pd 3;
	request domain-name-servers;
	request domain-name;
	script "/var/etc/dhcp6c_wan_script.sh";
};
id-assoc na 0 { };
id-assoc pd 0 {
	prefix-interface re1.1 {
		sla-id 0;
		sla-len 0;
	};
};
id-assoc pd 1 {
	prefix-interface re1.2 {
		sla-id 0;
		sla-len 0;
	};
};
id-assoc pd 2 {
	prefix-interface re1.3 {
		sla-id 0;
		sla-len 0;
	};
};
id-assoc pd 3 {
	prefix-interface re1.4 {
		sla-id 0;
		sla-len 0;
	};
};

But im getting this error

failed to parse configuration file
/var/etc/dhcp6c.conf:13 invalid interface (re1.4): Device not configured

But im pretty sure the device is configure they are as this is
Screenshot 2023-01-17 002856

Additional RG/Firmware Information

Howdy,

Apologies if this is not the correct way to submit this. I have a HUMAX BGW320-500 running firmware 3.19.5. The state table also shows a maximum of 8192 sessions. Thanks for making this guide!

22-10-04T12-27-02_FFvQR5TgQZ

22-10-04T12-27-12_vivaldi_GayVJdxpaO

README: Google devices are supported if SLAAC is used on LAN-side interfaces

Please update the README comment regarding Google/Android devices. It implies that GUAs can't be used with Google/Android devices, which is incorrect.

Once an interface has been assigned a GUA prefix using this repo's recipe, SLAAC/RAs can be enabled on the interface and the device will generate v6 addresses accordingly just as with ULAs.

Thx.

ia-na isnt necessary

The ia-na configuration just adds another ipv6 address to the wan interface of the firewall. It isn't necessary.

You may wish to exclude it entirely or just note it as optional.

I just felt that it was worth mentioning,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.