Skip to content

Instantly share code, notes, and snippets.

@jamesmacwhite
Last active October 27, 2024 21:27
Show Gist options
  • Save jamesmacwhite/58757c67cf6566c3d6cff46ece2fea32 to your computer and use it in GitHub Desktop.
Save jamesmacwhite/58757c67cf6566c3d6cff46ece2fea32 to your computer and use it in GitHub Desktop.
An example and overview of mwan3 IPv6 configuration with NAT6 (sorry anti IPv6 NAT people)

Deploying mwan3 with IPv6 (using NAT6)

I'm a user of mwan3 and contribute to its development in a small way by mainly providing feedback with my multi WAN setup and maintaining the beast of it's documentation on the OpenWrt wiki (feedback and contributors welcome).

This setup ultimately requires the use of a NAT6 firewall script. NAT6 is currently broke with fw3 and LuCI, so this is an important helper script to workaround this current limitation.

The NAT6 configuration requirements are explained in more detail on the OpenWrt wiki.

This gist is aims to document my configuration for others.

mwan3 version

I use version 2.8.15. Currently this is the latest stable build version for the 19.07 branch. Right now mwan3 is currently undergoing some major development to be made compatiable with the next major version of OpenWrt, 20.x, but it is considered to be quite bleeding edge currently. If you are using snapshot builds in a production scenario (because you clearly like to live dangerously!) you might want to give version 2.10 onwards a try, but be warned, here be dragons! Be prepared to debug and report issues to the maintainers of mwan3 on the OpenWrt packages issue tracker.

Use VLANs to create WAN interfaces

You don't need to have a router that has more than WAN port by design, you can instead reconfigure the switch ports and convert one or more LAN ports into independent WAN ports, this is achieved through VLANs. This offers a few advantages mainly:

  • Flexibility of creating multiple WAN ports as required
  • No need to run multiple routers in your network
  • No need to purchase specific routers with dual or multiple WAN ports
  • No need for expensive enterprise kit. (yay).

I use a Linksys WRT3200ACM as my main router and this has good OpenWrt support (ignoring the Marvell WiFI driver drama) overall and is VLAN capable.

My network interfaces

If you can beat this amount of network interfaces, you've done well! This isn't going to be your typical dual WAN setup, but it does help having a lot of diverse connections to really test mwan3 and it's functionality. With the default firewall mask 0x3F00, mwan3 supports up to 60 physical or logical interfaces, so we are comfortably below any limitations here.

Using the interface name, rather than device name, this is my full list of network interfaces as a summary:

  • wan - Virgin Media DOCSIS 3.0 Cable (DHCP)
  • wan6 - Not active. Reserved for when this provider enables IPv6
  • wanb - Vodafone Business Broadband (PPPoE, Static IPv4)
  • wanb6 - Not active. Reserved for when this provider enables IPv6
  • wanc - EE 4G broadband (Static IPv4 configuration to another router)
  • wanc6 - EE 4G broadband (DHCPv6 auto configuration to another router)
  • aaisp - Andrews and Arnold L2TP tunnel (Static IPv4)
  • aaisp6 - Andrews and Arnold L2TP tunnel (delegated /48 IPv6 prefix)
  • henet - Hurricane Electric 6in4 IPv6 tunnel (bound to wanb)
  • wg - Wireguard client to Mullvad.net
  • wg6 - Static /128 ULA IPv6 address provided by config
  • wgb - Wireguard client to Mullvad.net
  • wgb6 - Static /128 ULA IPv6 address provided by config

All IPv6 interfaces that are in use have been split. This is achieved using alias interfaces. This is currently required because mwan3 does not currently handle dual stack interfaces. It expects any interface to be one specific family i.e. IPv4 or IPv6 not both.

Additional network interfaces

  • docsismodem - My cable modem for my wan. Allows me to access the modem at 192.168.100.1. This is in bridge mode.
  • vigormodem - My Draytek Vigor 130 DSL modem doing passthrough for wanb, configuring my router with a static address within it's network range 192.168.2.0/24, so I can access the modem information.

My general setup explained

Clearly my network setup has a lot of network interfaces, the main reason for this is due to wanting IPv6 connectivity across all WANs configured. This however is a problem when your provider itself doesn't provide it :(! In order to have proper failover for both IPv4 and IPv6 for each WAN, IPv6 needs to exist in some form for each member policy after all. While not having IPv6 wouldn't break anything, I'd essentially have unbalanced IPv6 policies, which could lead to interesting results with failover.

The summary of my network interfaces and connections is:

  • Three physical indepedent WAN connections from three different providers (WAN, WANB and WANC, with their IPv6 interface counterparts). Not all wanX6 interfaces are used, because they aren't actually direct IPv6 from the WAN connection in some cases as explained above)
  • Two Wireguard connections from Mullvad.net connecting to two different tunnel endpoints (different colo providers)
  • Two tunnel based connections (L2TP and 6in4).

I pretty much use mwan3 for failover, because my independent internet connections are not equal, so load balancing doesn't really make a lot of sense. The exception to this is for my two Wireguard connections, these are load balanced.

Firewall/NAT6 configuration

Most of the NAT6 configuration and heavy lifting is handled by the firewall.nat6 firewall script. Once this is in place, to activate NAT6 on a firewall zone, you need to add option masq6 '1' to the zone in /etc/config/firewall. Essentially, if you have option masq '1' set on a zone already, add option masq6 '1' as well. There is also a masq6_privacy option. This essentially makes the outbound IPv6 address a temporary address that changes regularly, the idea being to make it harder to track you, but I wouldn't rely on this as a privacy feature, instead use TOR or a VPN. Equally not all network interfaces support it even when enabled.

All my WAN interfaces are attached to the WAN zone that is provided by default as it's the most easiest solution to build off. The exception is the Wireguard interfaces, as they don't have the same firewall requirements as the physical WAN network interfaces, given no inbound configuration is needed. So another Wireguard firewall zone exists. In addition, I have made an unrelated change to the WAN zone by changing the Input and Forward chains to DROP rather than REJECT, just to stop wasted CPU cycles of my router sending a response to bots or script kiddies probing my IPs, given I have multiple external static addresses configured on my route.

The firewall.nat6 script can be partially broken if your firewall configuration doesn't indiviually list network interfaces like so:

config zone
        option name 'wan'
        option output 'ACCEPT'
        option masq '1'
        option mtu_fix '1'
        option masq6 '1'
        option masq6_privacy '1'
        option forward 'DROP'
        option input 'DROP'
        list network 'wan'
        list network 'wan6'
        ....

If uci show firewall outputs something like the example below:

firewall.@zone[1].network='wan wan6...'

Amend /etc/config/firewall to the list network format shown above accordingly, otherwise part of the script will fail when reporting network devices inspected, as it will not be able to loop through the network interfaces assigned to that specific firewall zone.

When installing the NAT6 script /etc/firewall.nat6 make sure to add this file path to the /etc/sysupgrade.conf file so it is kept on any further firmware upgrades, otherwise the NAT6 config will be lost on any sysupgrade and you'll have to re-apply it.

mwan3 currently doesn't perform any IPv6 related helper configuration, because it tries to remain agnostic and instead would expect the user to configure whatever setup they want. All of the NAT6 configuration is mostly at the firewall level and doesn't require any specific configuration in mwan3 other than appropriately configuring interfaces and policies as you would with IPv4.

IPv6 static routes workaround (OpenWrt 19.07 and below)

When dealing with multiple independent IPv6 interfaces you may encounter permission denied or issues when trying to use ping or traceroute. This is due to a kernel protection relating to source addresses routing behaviour. This is why several route6 rules are present in the network config with a target of ::/0, this is to avoid this issue so the interfaces allow IPv6 traffic properly. Otherwise, it will be broken and mwan3 will mark the interfaces as down because the ping test mwan3track will perform will fail, getting a permission denied respone from the kernel.

This is something that occurrs with OpenWrt 19.07 and possibly older versions. I don't believe you have to implement this for snapshot builds, given the upstream kernel and mwan3 changes present in version 2.10 and above.

L2TP/PPP fwmark routing issues (OpenWrt 19.07.4 and below)

L2TP and possibly other PPP based network interfaces seem to be broken when fwmark is applied to packets for these interfaces, this was discovered when using L2TP and mwan3 together. Massive credit to @aaronjg who helped debug this issue. It seems as soon as a single fwmark is applied, routing would break horribly. I explain the issue a bit more detail over on my Medium article.

The fix is to apply the following iptables rule as a custom rule to workaround the issue, preventing mwan3 from marking these packets and triggering the issue, although it is not a specific issue with mwan3 but fwmark and routing in the kernel.

iptables -t mangle -I OUTPUT -d 90.155.53.19 -p udp --dport 1701 --sport 1701 -j RETURN

90.155.53.19 is the L2TP endpoint of AAISP.

This doesn't occur on snapshot builds and was fixed in OpenWrt release 19.07.5, with backported kernel patches.

Why NAT6?

I'll acknowledge NAT6 has many disadvantages and I don't neccersarily recommend it is the solution for everyone. Some people will hate me for even mentioning NAT and IPv6 together. An alternative is NETMAP however this requires you to have a prefix to be mapped for every ULA prefix defined and in my case this isn't possible for two of my WAN connections.

Inbound IPv6 communication is still possible with NAT6. If you have at least one prefix delegated by your ISP (ideally as static), inbound rules can be configured through standard firewall rules.

My use of NAT6 is because I ultimately have a mix of some WANs with a delegated a prefix and others not. In addition, Mullvad's IPv6 configuration for Wireguard also uses NAT6, because they only provide a /128 ULA address on your side of the tunnel, without NAT6 here, you cannot configure Wireguard to work across the LAN, given the ULA is only usable on the router without NAT6.

Generally IPv6 masquerading makes IPv6 balancing/failover work well with mwan3. I welcome anyone using mwan3 and IPv6 with alternative configurations to provide their thoughts however. While IPv6 has been around for a long time, its adoption is still slow and therefore the use of IPv6 and mwan3 is suspected to be low, so sharing your experiences and configurations will help improve mwan3 and IPv6 support going forward.

config defaults
option output 'ACCEPT'
option forward 'REJECT'
option input 'ACCEPT'
option synflood_protect '1'
option drop_invalid '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option network 'lan'
option forward 'ACCEPT'
config zone
option name 'wan'
option output 'ACCEPT'
option masq '1'
option mtu_fix '1'
option masq6 '1'
option masq6_privacy '0'
option forward 'DROP'
option input 'DROP'
list network 'wan'
list network 'wan6'
list network 'wanb'
list network 'wanb6'
list network 'wanc'
list network 'wanc6'
list network 'aaisp'
list network 'aaisp6'
list network 'vigormodem'
list network 'docsismodem'
list network 'henet'
config forwarding
option dest 'wan'
option src 'lan'
config zone
option name 'guest'
option forward 'REJECT'
option output 'ACCEPT'
option network 'guest'
option input 'REJECT'
config forwarding
option dest 'wan'
option src 'guest'
config zone
option output 'ACCEPT'
option forward 'REJECT'
option input 'REJECT'
option masq '1'
option name 'wireguard'
option mtu_fix '1'
option masq6 '1'
option masq6_privacy '0'
list network 'wg'
list network 'wgb'
list network 'wg6'
list network 'wgb6'
config forwarding
option src 'lan'
option dest 'wireguard'
config include
option path '/etc/firewall.user'
config include 'nat6'
option path '/etc/firewall.nat6'
option reload '1'
#!/bin/sh
# NAT6 + masquerading firewall script
# https://github.com/akatrevorjay/openwrt-masq6
# trevorj <[email protected]>
#
# You can configure in /etc/config/firewall per zone:
# * IPv4 masquerading
# option masq 1
# * IPv6 masquerading
# option masq6 1
# * IPv6 privacy extensions
# option masq6_privacy 1
set -e -o pipefail
. /lib/functions.sh
. /lib/functions/network.sh
. /usr/share/libubox/jshn.sh
log() {
logger -t nat6 -s "${@}"
}
get_ula_prefix() {
uci get network.globals.ula_prefix
}
validate_ula_prefix() {
local ula_prefix="${1}"
if [ $(echo "${ula_prefix}" | grep -c -E -e "^([0-9a-fA-F]{4}):([0-9a-fA-F]{0,4}):") -ne 1 ] ; then
log "Fatal error: IPv6 ULA ula_prefix=\"${ula_prefix}\" seems invalid. Please verify that a ula_prefix is set and valid."
return 1
fi
}
ip6t() {
ip6tables "${@}"
}
ip6t_add() {
if ! ip6t -C "${@}" &> /dev/null; then
ip6t -I "${@}"
fi
}
nat6_init() {
iptables-save -t nat \
| sed -e "/\s[DS]NAT\s/d;/\sMASQUERADE$/d;/\s--match-set\s\S*/s//\06/" \
| ip6tables-restore -T nat
}
masq6_network() {
# ${config} contains the ID of the current section
local network_name="${1}"
local device
network_get_device device "${network_name}" || return 0
local done_net_dev
for done_net_dev in ${DONE_NETWORK_DEVICES}; do
if [ "${done_net_dev}" = "${device}" ]; then
log "Already configured device=\"${device}\", so leaving as is."
return 0
fi
done
log "Found device=\"${device}\" for network_name=\"${network_name}\"."
if [ "${zone_masq6_privacy}" -eq 1 ]; then
log "Enabling IPv6 temporary addresses for device=\"${device}\"."
log "Accepting router advertisements on ${device} even if forwarding is enabled (required for temporary addresses)"
echo 2 > "/proc/sys/net/ipv6/conf/${device}/accept_ra" \
|| log "Error: Failed to change router advertisements accept policy on ${device} (required for temporary addresses)"
log "Using temporary addresses for outgoing connections on interface ${device}"
echo 2 > "/proc/sys/net/ipv6/conf/${device}/use_tempaddr" \
|| log "Error: Failed to enable temporary addresses for outgoing connections on interface ${device}"
fi
append DONE_NETWORK_DEVICES "${device}"
}
handle_zone() {
# ${config} contains the ID of the current section
local config="${1}"
local zone_name
config_get zone_name "${config}" name
# Enable masquerading via NAT6
local zone_masq6
config_get_bool zone_masq6 "${config}" masq6 0
log "Firewall config=\"${config}\" zone=\"${zone_name}\" zone_masq6=\"${zone_masq6}\"."
if [ "${zone_masq6}" -eq 0 ]; then
return 0
fi
# IPv6 privacy extensions: Use temporary addrs for outgoing connections?
local zone_masq6_privacy
config_get_bool zone_masq6_privacy "${config}" masq6_privacy 1
log "Found firewall zone_name=\"${zone_name}\" with zone_masq6=\"${zone_masq6}\" zone_masq6_privacy=\"${zone_masq6_privacy}\"."
log "Setting up masquerading nat6 for zone_name=\"${zone_name}\" with zone_masq6_privacy=\"${zone_masq6_privacy}\""
local ula_prefix="$(get_ula_prefix)"
validate_ula_prefix "${ula_prefix}" || return 1
local postrouting_chain="zone_${zone_name}_postrouting"
log "Ensuring ip6tables chain=\"${postrouting_chain}\" contains our MASQUERADE."
ip6t_add "${postrouting_chain}" -t nat \
-m comment --comment "!fw3" -j MASQUERADE
local input_chain="zone_${zone_name}_input"
log "Ensuring ip6tables chain=\"${input_chain}\" contains our permissive DNAT rule."
ip6t_add "${input_chain}" -t filter -m conntrack --ctstate DNAT \
-m comment --comment "!fw3: Accept port forwards" -j ACCEPT
local forward_chain="zone_${zone_name}_forward"
log "Ensuring ip6tables chain=\"${forward_chain}\" contains our permissive DNAT rule."
ip6t_add "${forward_chain}" -t filter -m conntrack --ctstate DNAT \
-m comment --comment "!fw3: Accept port forwards" -j ACCEPT
local DONE_NETWORK_DEVICES=""
config_list_foreach "${config}" network masq6_network
log "Done setting up nat6 for zone=\"${zone_name}\" on devices: ${DONE_NETWORK_DEVICES}"
}
main() {
nat6_init
config_load firewall
config_foreach handle_zone zone
}
main "${@}"
config globals 'globals'
option mmx_mask '0x3F00'
config interface 'wan'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '8.8.8.8'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option reliability '2'
option family 'ipv4'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wan6'
option enabled '0'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '2'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wanb'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '8.8.8.8'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option reliability '1'
option family 'ipv4'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wanb6'
option enabled '0'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '1'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wanc'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '8.8.8.8'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option reliability '1'
option family 'ipv4'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wanc6'
option enabled '1'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '1'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'aaisp'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option reliability '1'
option family 'ipv4'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'aaisp6'
option enabled '1'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '2'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'henet'
option enabled '1'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '1'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wg'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option reliability '1'
option family 'ipv4'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wg6'
option enabled '1'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '1'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wgb'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
list track_ip '208.67.222.222'
list track_ip '208.67.220.220'
option reliability '1'
option family 'ipv4'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config interface 'wgb6'
option enabled '1'
list track_ip '2001:4860:4860::8888'
list track_ip '2001:4860:4860::8844'
list track_ip '2620:0:ccc::2'
list track_ip '2620:0:ccd::2'
option reliability '1'
option family 'ipv6'
option initial_state 'online'
option track_method 'ping'
option count '1'
option size '56'
option max_ttl '60'
option check_quality '0'
option timeout '4'
option interval '10'
option failure_interval '5'
option recovery_interval '5'
option down '5'
option up '5'
config member 'wan_m1_w3'
option interface 'wan'
option metric '1'
option weight '3'
config member 'wan_m2_w3'
option interface 'wan'
option metric '2'
option weight '3'
config member 'wan6_m1_w3'
option interface 'wan6'
option metric '1'
option weight '3'
config member 'wan6_m2_w3'
option interface 'wan6'
option metric '2'
option weight '3'
config member 'wanb_m1_w2'
option interface 'wanb'
option metric '1'
option weight '2'
config member 'wanb_m2_w2'
option interface 'wanb'
option metric '2'
option weight '2'
config member 'wanb6_m1_w2'
option interface 'wanb6'
option metric '1'
option weight '2'
config member 'wanb6_m2_w2'
option interface 'wanb6'
option metric '2'
option weight '2'
config member 'wanc_m1_w2'
option interface 'wanc'
option metric '1'
option weight '2'
config member 'wanc_m2_w2'
option interface 'wanc'
option metric '2'
option weight '2'
config member 'wanc_m3_w1'
option interface 'wanc'
option metric '3'
option weight '1'
config member 'wanc6_m1_w2'
option interface 'wanc6'
option metric '1'
option weight '2'
config member 'wanc6_m2_w2'
option interface 'wanc6'
option metric '2'
option weight '2'
config member 'wanc6_m3_w1'
option interface 'wanc6'
option metric '3'
option weight '1'
config member 'aaisp_m1_w3'
option interface 'aaisp'
option metric '1'
option weight '3'
config member 'aaisp6_m1_w3'
option interface 'aaisp6'
option metric '1'
option weight '3'
config member 'aaisp6_m2_w3'
option interface 'aaisp6'
option metric '2'
option weight '3'
config member 'henet_m1_w2'
option interface 'henet'
option metric '1'
option weight '2'
config member 'henet_m2_w2'
option interface 'henet'
option metric '2'
option weight '2'
config member 'wg_m1_w3'
option interface 'wg'
option metric '1'
option weight '3'
config member 'wg6_m1_w3'
option interface 'wg6'
option metric '1'
option weight '3'
config member 'wgb_m1_w3'
option interface 'wgb'
option metric '1'
option weight '3'
config member 'wgb6_m1_w3'
option interface 'wgb6'
option metric '1'
option weight '3'
config policy 'wan_only'
list use_member 'wan_m1_w3'
list use_member 'aaisp6_m1_w3'
option last_resort 'unreachable'
config policy 'wanb_only'
list use_member 'wanb_m1_w2'
list use_member 'henet_m1_w2'
option last_resort 'unreachable'
config policy 'wanc_only'
list use_member 'wanc_m1_w2'
list use_member 'wanc6_m1_w2'
option last_resort 'unreachable'
config policy 'wan_wanb'
list use_member 'wan_m1_w3'
list use_member 'wanb_m2_w2'
list use_member 'aaisp6_m1_w3'
list use_member 'henet_m2_w2'
option last_resort 'unreachable'
config policy 'wan_wanb_wanc'
list use_member 'wan_m1_w3'
list use_member 'wanb_m2_w2'
list use_member 'wanc_m3_w1'
list use_member 'aaisp6_m1_w3'
list use_member 'henet_m2_w2'
list use_member 'wanc6_m3_w1'
option last_resort 'unreachable'
config policy 'wanb_wan'
list use_member 'wan_m2_w3'
list use_member 'wanb_m1_w2'
list use_member 'aaisp6_m2_w3'
list use_member 'henet_m1_w2'
option last_resort 'unreachable'
config policy 'aaisp_only'
list use_member 'aaisp_m1_w3'
list use_member 'aaisp6_m1_w3'
option last_resort 'unreachable'
config policy 'henet_only'
list use_member 'henet_m1_w2'
option last_resort 'unreachable'
config policy 'vpn_balanced'
list use_member 'wg_m1_w3'
list use_member 'wg6_m1_w3'
list use_member 'wgb_m1_w3'
list use_member 'wgb6_m1_w3'
option last_resort 'unreachable'
config policy 'vpn_only'
list use_member 'wg_m1_w3'
list use_member 'wg6_m1_w3'
option last_resort 'unreachable'
config policy 'vpnb_only'
list use_member 'wgb_m1_w3'
list use_member 'wgb6_m1_w3'
option last_resort 'unreachable'
config rule 'https'
option sticky '1'
option dest_port '443'
option proto 'tcp'
option use_policy 'wan_wanb_wanc'
config rule 'default_rule_v4'
option dest_ip '0.0.0.0/0'
option family 'ipv4'
option use_policy 'wan_wanb_wanc'
config rule 'default_rule_v6'
option dest_ip '::/0'
option family 'ipv6'
option use_policy 'wan_wanb_wanc'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd77:550d:5fb8::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
list dns '192.168.1.2'
list dns '192.168.1.3'
config interface 'wan'
option ifname 'eth1.2'
option proto 'dhcp'
option metric '10'
option peerdns '0'
option broadcast '1'
config interface 'wan6'
option proto 'dhcpv6'
option reqprefix '48'
option peerdns '0'
option reqaddress 'force'
option ifname '@wan'
option auto '0'
config interface 'guest'
option proto 'static'
option ipaddr '192.168.10.1'
option netmask '255.255.255.0'
option ip6assign '64'
config interface 'docsismodem'
option proto 'static'
option ifname '@wan'
option ipaddr '192.168.100.2'
option netmask '255.255.255.0'
config interface 'wanb'
option proto 'pppoe'
option ifname 'eth0.4'
option peerdns '0'
option password '********'
option keepalive '5 5'
option ipv6 '1'
option username '***********************************'
option metric '20'
config interface 'wanb6'
option ifname '@wanb'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option auto '0'
config interface 'vigormodem'
option proto 'static'
option ipaddr '192.168.2.2'
option netmask '255.255.255.0'
option ifname 'eth0.4'
config interface 'wanc'
option ifname 'eth0.3'
option proto 'static'
option netmask '255.255.255.0'
option metric '30'
option ipaddr '192.168.3.2'
option gateway '192.168.3.1'
option force_link '0'
config interface 'wanc6'
option proto 'dhcpv6'
option ifname '@wanc'
option reqaddress 'try'
option metric '30'
option reqprefix 'auto'
option force_link '1'
option peerdns '0'
config interface 'aaisp'
option proto 'l2tp'
option server 'l2tp.aa.net.uk'
option username '********'
option metric '40'
option ipv6 '1'
option peerdns '0'
option password '****************'
config interface 'aaisp6'
option proto 'dhcpv6'
option ifname '@aaisp'
option reqaddress 'try'
option reqprefix 'auto'
option peerdns '0'
option metric '10'
config interface 'henet'
option proto '6in4'
option peeraddr '216.66.80.26'
option ip6addr 'xxxx:xxx:xxxx:xx::2/64'
list ip6prefix 'xxxx:xxx:xxxx::/48'
option ipaddr 'xx.xx.xx.xx'
option mtu '1480'
option metric '20'
config interface 'vpn'
option proto 'none'
option ifname 'tun0'
option delegate '0'
option metric '100'
config interface 'wg'
option proto 'wireguard'
option private_key '*********************************************'
option force_link '1'
list addresses '10.64.97.29/32'
option metric '50'
config interface 'wg6'
option ifname '@wg'
option proto 'static'
list ip6addr 'fc00:bbbb:bbbb:bb01::1:611c/128'
option metric '50'
config wireguard_wg
option endpoint_port '51820'
list allowed_ips '0.0.0.0/0'
list allowed_ips '::0/0'
option route_allowed_ips '1'
option persistent_keepalive '25'
option public_key '*********************************************'
option endpoint_host 'xxx.xxx.xxx.xx'
config interface 'wgb'
option proto 'wireguard'
option private_key '*********************************************'
option force_link '1'
list addresses '10.66.210.97/32'
option metric '55'
config wireguard_wgb
option endpoint_port '51280'
list allowed_ips '0.0.0.0/0'
list allowed_ips '::0/0'
option route_allowed_ips '1'
option persistent_keepalive '25'
option public_key '*********************************************'
option endpoint_host 'xxx.xxx.xxx.xxx'
config interface 'wgb6'
option ifname '@wgb'
option proto 'static'
list ip6addr 'fc00:bbbb:bbbb:bb01::3:d260/128'
option metric '55'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '5t 1 0'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '6t 4'
option vid '2'
config switch_vlan
option device 'switch0'
option vlan '3'
option ports '5t 3'
option vid '3'
config route6
option target '::/0'
option interface 'aaisp6'
config route6
option interface 'wanc6'
option target '::/0'
option gateway 'fe80::8a9e:33ff:fef6:7954'
config route6
option interface 'wg6'
option target '::/0'
config route6
option interface 'wgb6'
option target '::/0'
config route6
option interface 'henet'
option target '::/0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment