Using OpenWRT 24.10 with nftables v1.1.1, I'm trying to set up NPTv6 for multiple Internet providers, specifically "Extend 3GPP WAN interface /64 prefix via PDNAL (RFC 7278)". Here's a detailed guide on how to achieve this.
Introduction
In this article, we will discuss how to configure multiple Internet providers using NPTv6 on OpenWRT 24.10 with nftables v1.1.1. We will also cover the extension of a 3GPP WAN interface using a /64 prefix via PDNAL (RFC 7278).
Prerequisites
Before we begin, ensure you have the following:
- A working OpenWRT 24.10 router with nftables v1.1.1 installed.
- Two or more Internet connections.
Step 1: Configure Interfaces
First, let's configure the interfaces for each Internet connection.
# For WAN1
config interface 'wan1'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1/24'
option gateway '192.168.1.254'
# For WAN2
config interface 'wan2'
option ifname 'eth1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.2.1/24'
option gateway '192.168.2.254'
Step 2: Configure Routing
Next, let's set up routing for the Internet connections.
# For WAN1
config route
option interface 'wan1'
option gateway '192.168.1.254'
option metric '1'
# For WAN2
config route
option interface 'wan2'
option gateway '192.168.2.254'
option metric '2'
Step 3: Configure NPTv6
Now, let's configure NPTv6 for the LAN interface.
config nft
option nftables '1.1.1'
config nft_nat
option mode 'ip6'
option rule_id '1'
config rule
option type 'prerouting'
option src_type 'route'
option dst_type 'route'
option dst_zone 'lan'
option target 'SNAT'
option to_src 'wan1'
option max_dst_port '65535'
config rule
option type 'prerouting'
option src_type 'route'
option dst_type 'route'
option dst_zone 'lan'
option target 'SNAT'
option to_src 'wan2'
option max_dst_port '65535'
Step 4: Configure PDNAL
Finally, let's configure PDNAL for the 3GPP WAN interface.
config pdnl
option interface '3gpp'
option type 'static'
option prefix 'fd00::/64'
option gateway 'fe80::1'
Summary
In this guide, we learned how to configure multiple Internet providers using NPTv6 on OpenWRT 24.10 with nftables v1.1.1. We also covered the extension of a 3GPP WAN interface using a /64 prefix via PDNAL (RFC 7278).
References