thanks @xiaofan
I kind of 'give up' on the /64 or /56 prefix delegation and worked on configuring my Linux box running Unbuntu.
I tried something, and it works for me and hence I'm documenting it in this thread:
Singnet (Singtel) broadband connectivity using Dual Stack with ONT (note not ONR) in a Linux PC (Unbuntu) using NAT66 (ip6-ip6 network address translation) single IPv6 address (no prefix delegation)
Apparently, based on my own test, the old '6rd' may no longer work, covered in previous comments.
Just that I'm not sure if it is my own mistakes or that 6rd didn't work. But this comment document my success with the 'new' dual stack approach.
Note that this may after all work on even ONR (without bridge mode), but it is double NAT , i.e. the ONR is one NAT, then this is the 2nd NAT. It'd mainly work for 'outgoing' traffic for double NAT setups (e.g. web browsing).
To get 'direct' on internet, the ONR would need to do bridge mode. i.e. the DHCP address is a real internet ip address from SIngtel's DHCP server.
My setup is on Ubuntu 22 Jammy jellyfish to connect to Singnet with both IPv4 and IPv6. Currently, Ubuntu LTS version is 24 and is actually newer than what I'm running, hence the current releases should work)
https://ubuntu.com/download/server
Note that this depends on NAT66 which requires a recent kernel say later than 6.5.Currently, I'm running on 6.8.
you may need to install network manager if it isn't there, e.g.
Setup the ethernet interfaces normally using NetworkManager, one can use the GUI if one prefers.
Chances are that if one installs the distribution, the interfaces may already be preconfiigured.
Newer setups e.g. ONR in *bridge* mode may be able to do without the VLAN. If that is the case one can simply use the external facing interface for the SIngnet broadband connection (i.e. going to ONR / ONT)
Vlan tagging is required in the 'old' ONT configs.
this is for the *old* VLAN10 interface, add the VLAN10 as a new VLAN interface e.g.
one can use the GUI if preferred, probably easier
This will be the Singnet broadband connection
Among the things to note:
(if that 'don't work' try using ISC dhcp client
https://www.isc.org/dhcp/
In network manager according to this guide, you can change it in a config file
https://wiki.archlinux.org/title/NetworkManager#DHCP_client
/etc/NetworkManager/conf.d/dhcp-client.conf
I'm myself using this dhclient config which uses the ISC dhcp client.
I've seen NetworkManager worked without this, but that my own preference is using this ISC dhcp client.
using dhclient writes the leases into /var/lib/dhcp as files, and with NetworkManager in /var/lib/NetworkManager/ instead )
https://www.baeldung.com/linux/nmcli-wap-sharing-internet
But I used hostapd, with a setup quite similar to this
https://gist.github.com/ag88/de02933ba65500376d1ff48e504b1bf3
https://w1.fi/hostapd/
hosapd is more raw and more difficult to setup but a benefit is it logs every wifi connection in journalctl logs.
But at the end of the day your Wifi hardware (interface) needs to have AP mode supported in Linux for either of the above to work.
https://thekelleys.org.uk/dnsmasq/doc.html
And it would NAT (network address translate) the connection using "masquerade" on this wan interface.
The other connection could be e.g. your wifi that is shared out.
This is for 'really simple' setups
my own configs is a lot more 'complicated' because I disliked DNSMasq, though it makes things simple by 'doing everything for you'. Sometimes this may not be what one prefers / wanted.
in my case i used nftables
https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
and I have statements like
https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)
in seperate scripts
https://help.ubuntu.com/community/UFW
there are *a lot of catch* in setting up the firewall , unfortunately I'm using nftables which has 'much more complicated / verbose' looking scripts / rules and hence I'd prefer not to share them to avoid unnecessarily 'scaring' others away.
among the things, if you want to firewall IPv6 ICMP packets, make sure to alllow NDP
https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol
on practically all interfaces
and to allow (IPV6 *only* port 546 dhcpv6-client) on the wan interface, this port is used by the IPv6 DHCP client to connect to the DHCP server to get a new address.
firewall 'errors' can create a lot of 'miseries' , but I'd guess one would need to systematically work that.
I failed quite a few time with the Network Manager setups , dhcp etc and it turns out it is because I blocked too many things like IPv6 NDP ICMP packets, IPV6 ports etc. I practically blocked 'everything' on wan side except port 546 for the dhcp client and the ICMP packets.
even for port 546, I'd recommend restrict to only traffic from fe80::/16, i.e. only link local address, because I think ISP (e.g. Singnet) don't let packets with source from fe80::/16 to cross the routers, this prevent anyone in the internet *beyond the immediate Singnet router* from trying to spoof the DHCP server giving you *fake* address provided you take response only from fe80::/16.
I run my own radvd (router advertisement) for my wifi network
https://github.com/radvd-project/radvd
and I used local unique address starting with fd00::/16 (invent your own subnets down from fd00::/16) for the internal lan (e.g. wifi) networks.
https://en.wikipedia.org/wiki/Unique_local_address
Then that the NAT as discussed above do that 'masquerade' to bridge these addresses to that 1 single IPv4/v6 address.
I'd not document the 'dirty' details here but the gist is to assign fd00:: your_subnet) addresses for your local interfaces
and I'd hope DNSMasq
https://thekelleys.org.uk/dnsmasq/doc.html
can help you for the 'simple' (canonical) cases.
there are quite some tricky stuff like I found out i need to set
in the radvd.conf
https://github.com/radvd-project/radvd
without these android phones won't even setup IPv6 addresses properly and say no IPv6.
if you prefer to do it the 'hard' way like I did, i.e. no DNSmasq, more complicated network config e.g. subnets may run into the limits of what DNSMasq offers. For 'simple' 2 iinterface cases e.g. just wan and wifi, DNSMasq could likely do all that 'hard work'. alternatively, one can consider software bridging the wifi and lan into 1 network and it is likely DNSMasq can handle that as well. DNSMasq is 'hidden' inside NetworkManager when you set the interface to 'shared' mode. If you don't use 'shared' mode, then DNSMasq is inactive, and you need to *setup everything yourself* (e.g. configure NAT , firewall, configure DNS resolver, configure a DHCP server your own for your wifi and LAN, configure router advertisement e.g. using radvd )
for those reading this and trying this out, do document if it is successful (e.g. add a comment in this thread) , issues etc.
there is a benefit of running a full Linux pc/box (server) as a router although it is normally deemed more expensive and probably won't get you the Wifi 7 or even WiFi 6 Wifis. i.e. won't reach those even 3 Gbps speeds offered by the ISP. It actually depends on the hardware you use and if you can find drivers for the WiFi cards or interfaces.
The benefit with using a full Linux box/pc is that it is a server and you can self host various apps on the box (server) itself. this is a 'recent' fad, one can find more about it on internet e.g.
https://www.reddit.com/r/selfhosted/
In terms of 'small' boxes, Intel NUC (or mini PCs) comes up as an option. but it would likely run on 'old' PCs as 'boxes' (server) , one can use used PCs (or mini PCs) and some of them has interesting specs like Intel i7 or Amd Ryzen processors, these PCs (or mini PCs) after all are often *much faster* than 'small' routers where it comes to doing NAT and various other stuff. One can even use a Raspberry Pi if one wants, but that its wifi chip is small hence may have limited range and won't reach those Gbps speeds.
I kind of 'give up' on the /64 or /56 prefix delegation and worked on configuring my Linux box running Unbuntu.
I tried something, and it works for me and hence I'm documenting it in this thread:
Singnet (Singtel) broadband connectivity using Dual Stack with ONT (note not ONR) in a Linux PC (Unbuntu) using NAT66 (ip6-ip6 network address translation) single IPv6 address (no prefix delegation)
Apparently, based on my own test, the old '6rd' may no longer work, covered in previous comments.
Just that I'm not sure if it is my own mistakes or that 6rd didn't work. But this comment document my success with the 'new' dual stack approach.
Note that this may after all work on even ONR (without bridge mode), but it is double NAT , i.e. the ONR is one NAT, then this is the 2nd NAT. It'd mainly work for 'outgoing' traffic for double NAT setups (e.g. web browsing).
To get 'direct' on internet, the ONR would need to do bridge mode. i.e. the DHCP address is a real internet ip address from SIngtel's DHCP server.
- use a (fairly) recent distribution kernel version
My setup is on Ubuntu 22 Jammy jellyfish to connect to Singnet with both IPv4 and IPv6. Currently, Ubuntu LTS version is 24 and is actually newer than what I'm running, hence the current releases should work)
https://ubuntu.com/download/server
Note that this depends on NAT66 which requires a recent kernel say later than 6.5.Currently, I'm running on 6.8.
- Configure the interfaces (e.g. wan) using NetworkManager and ISC dhcp cliient
you may need to install network manager if it isn't there, e.g.
apt install NetworkManager isc-dhcp-client Setup the ethernet interfaces normally using NetworkManager, one can use the GUI if one prefers.
Chances are that if one installs the distribution, the interfaces may already be preconfiigured.
Newer setups e.g. ONR in *bridge* mode may be able to do without the VLAN. If that is the case one can simply use the external facing interface for the SIngnet broadband connection (i.e. going to ONR / ONT)
Vlan tagging is required in the 'old' ONT configs.
this is for the *old* VLAN10 interface, add the VLAN10 as a new VLAN interface e.g.
nmcli con add type vlan ifname VLAN10 dev eno1 vlan.id 10
one can use the GUI if preferred, probably easier
This will be the Singnet broadband connection
Among the things to note:
- IPv4 method should be "auto"
- IPv6 method should be "auto"
(if that 'don't work' try using ISC dhcp client
https://www.isc.org/dhcp/
In network manager according to this guide, you can change it in a config file
https://wiki.archlinux.org/title/NetworkManager#DHCP_client
/etc/NetworkManager/conf.d/dhcp-client.conf
[main]
dhcp=dhclient
I'm myself using this dhclient config which uses the ISC dhcp client.
I've seen NetworkManager worked without this, but that my own preference is using this ISC dhcp client.
using dhclient writes the leases into /var/lib/dhcp as files, and with NetworkManager in /var/lib/NetworkManager/ instead )
- sidenote: configure your local Wifi and LAN interfaces
https://www.baeldung.com/linux/nmcli-wap-sharing-internet
But I used hostapd, with a setup quite similar to this
https://gist.github.com/ag88/de02933ba65500376d1ff48e504b1bf3
https://w1.fi/hostapd/
hosapd is more raw and more difficult to setup but a benefit is it logs every wifi connection in journalctl logs.
But at the end of the day your Wifi hardware (interface) needs to have AP mode supported in Linux for either of the above to work.
- 'sharing out connection' NAT
- IPv4 method "shared"
- IPv6 method "shared"
https://thekelleys.org.uk/dnsmasq/doc.html
And it would NAT (network address translate) the connection using "masquerade" on this wan interface.
The other connection could be e.g. your wifi that is shared out.
This is for 'really simple' setups
my own configs is a lot more 'complicated' because I disliked DNSMasq, though it makes things simple by 'doing everything for you'. Sometimes this may not be what one prefers / wanted.
in my case i used nftables
https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
and I have statements like
nft add rule nat postrouting masquerade
https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)
in seperate scripts
- firewall
https://help.ubuntu.com/community/UFW
there are *a lot of catch* in setting up the firewall , unfortunately I'm using nftables which has 'much more complicated / verbose' looking scripts / rules and hence I'd prefer not to share them to avoid unnecessarily 'scaring' others away.
among the things, if you want to firewall IPv6 ICMP packets, make sure to alllow NDP
https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol
on practically all interfaces
and to allow (IPV6 *only* port 546 dhcpv6-client) on the wan interface, this port is used by the IPv6 DHCP client to connect to the DHCP server to get a new address.
firewall 'errors' can create a lot of 'miseries' , but I'd guess one would need to systematically work that.
I failed quite a few time with the Network Manager setups , dhcp etc and it turns out it is because I blocked too many things like IPv6 NDP ICMP packets, IPV6 ports etc. I practically blocked 'everything' on wan side except port 546 for the dhcp client and the ICMP packets.
even for port 546, I'd recommend restrict to only traffic from fe80::/16, i.e. only link local address, because I think ISP (e.g. Singnet) don't let packets with source from fe80::/16 to cross the routers, this prevent anyone in the internet *beyond the immediate Singnet router* from trying to spoof the DHCP server giving you *fake* address provided you take response only from fe80::/16.
- other stuff
I run my own radvd (router advertisement) for my wifi network
https://github.com/radvd-project/radvd
and I used local unique address starting with fd00::/16 (invent your own subnets down from fd00::/16) for the internal lan (e.g. wifi) networks.
https://en.wikipedia.org/wiki/Unique_local_address
Then that the NAT as discussed above do that 'masquerade' to bridge these addresses to that 1 single IPv4/v6 address.
I'd not document the 'dirty' details here but the gist is to assign fd00:: your_subnet) addresses for your local interfaces
and I'd hope DNSMasq
https://thekelleys.org.uk/dnsmasq/doc.html
can help you for the 'simple' (canonical) cases.
there are quite some tricky stuff like I found out i need to set
AdvRouterAddr on;
AdvDefaultLifetime 3600;
in the radvd.conf
https://github.com/radvd-project/radvd
without these android phones won't even setup IPv6 addresses properly and say no IPv6.
if you prefer to do it the 'hard' way like I did, i.e. no DNSmasq, more complicated network config e.g. subnets may run into the limits of what DNSMasq offers. For 'simple' 2 iinterface cases e.g. just wan and wifi, DNSMasq could likely do all that 'hard work'. alternatively, one can consider software bridging the wifi and lan into 1 network and it is likely DNSMasq can handle that as well. DNSMasq is 'hidden' inside NetworkManager when you set the interface to 'shared' mode. If you don't use 'shared' mode, then DNSMasq is inactive, and you need to *setup everything yourself* (e.g. configure NAT , firewall, configure DNS resolver, configure a DHCP server your own for your wifi and LAN, configure router advertisement e.g. using radvd )
for those reading this and trying this out, do document if it is successful (e.g. add a comment in this thread) , issues etc.
there is a benefit of running a full Linux pc/box (server) as a router although it is normally deemed more expensive and probably won't get you the Wifi 7 or even WiFi 6 Wifis. i.e. won't reach those even 3 Gbps speeds offered by the ISP. It actually depends on the hardware you use and if you can find drivers for the WiFi cards or interfaces.
The benefit with using a full Linux box/pc is that it is a server and you can self host various apps on the box (server) itself. this is a 'recent' fad, one can find more about it on internet e.g.
https://www.reddit.com/r/selfhosted/
In terms of 'small' boxes, Intel NUC (or mini PCs) comes up as an option. but it would likely run on 'old' PCs as 'boxes' (server) , one can use used PCs (or mini PCs) and some of them has interesting specs like Intel i7 or Amd Ryzen processors, these PCs (or mini PCs) after all are often *much faster* than 'small' routers where it comes to doing NAT and various other stuff. One can even use a Raspberry Pi if one wants, but that its wifi chip is small hence may have limited range and won't reach those Gbps speeds.
Last edited: