Why is there an automatic Outbound NAT for ::1/128
-
Just noticed recently that in the Outbound NAT page, if you use Automatic NAT or Hybrid NAT, there's an automatic NAT rule for ::1/128.
If you have IPv6 working and the router has a GUA IPv6 address what is the point of this NAT rule?
-
@IonutIT because ::1/128 is the localhost address.. just like you have an outbound nat for 127.0.0.0/8 which is the localhost IPv4 address range, normally local host would be 127.0.0.1, but really anything 127.x can be used as localhost address. With ipv6 the localhost range is just /128
if you source traffic from your localhost address it needs to be natted to the IP of the interface its leaving on. For example I use localhost for outgoing interface in unbound. Which gets natted to wan IP when unbound looks up something
-
@johnpoz yeah, that makes sense. I don't know why seeing IPv6 there triggered my thinking "what's the point if you have GUA addresses", but makes sense localhost needs NAT to work.
Can I ask why you use localhost for outhgoing interface in unbound instead of the WAN interface? What are the benefits?
-
@IonutIT localhost is always going to be up to bind to.. but possible that my wan or say a vpn interface is not up when unbound restarts. If interface is not up can not bind to it.. So helps to make sure unbound starts and binds on interface to use to do outgoing queries.