OPNsense Forum

English Forums => 26.1 Series => Topic started by: opnseeker on February 13, 2026, 11:16:51 PM

Title: What is ip6 equivalent of ip4 loopback address for redirect on the same device
Post by: opnseeker on February 13, 2026, 11:16:51 PM
In my setup unbound runs on a loopback interface (used for Opnsense GUI and few other services) at port 53053.

I am trying to write a Dest NAT rule that redirects all DNS requests (from some VLANs) reaching Opnsense (port 53) to 53053 on the loopback interface.

My ip4 rule works with redirect ip as 127.0.0.1. But I can't figure out the equivalent ip6 address. ::1 doesn't work and neither does the ULA address statically assigned to the interface.

Any suggestions would be appreciated.
Title: Re: What is ip6 equivalent of ip4 loopback address for redirect on the same device
Post by: OPNenthu on February 13, 2026, 11:33:27 PM
You can't use ::1 but the ULA should work.

In my setup I assigned a ULA VIP to the Loopback interface where Unbound also listens, then with a DNAT rule I forward outbound DNS on port 53 to that ULA IP.  Slightly different use case (to trap and redirect unencrypted DNS escapes) but same principle.  Seems to work OK.
Title: Re: What is ip6 equivalent of ip4 loopback address for redirect on the same device
Post by: nero355 on February 14, 2026, 01:14:32 AM
Quote from: opnseeker on February 13, 2026, 11:16:51 PMI am trying to write a Dest NAT rule that redirects all DNS requests (from some VLANs) reaching Opnsense (port 53) to 53053 on the loopback interface.

But I can't figure out the equivalent ip6 address. ::1 doesn't work and neither does the ULA address statically assigned to the interface.
Browse this topic : https://forum.opnsense.org/index.php?topic=9245.0

IIRC there are some solutions mentioned for IPv6 ;)