OPNsense Forum

English Forums => General Discussion => Topic started by: adam3914 on April 21, 2023, 03:32:35 PM

Title: Dual wan group and port forwarding
Post by: adam3914 on April 21, 2023, 03:32:35 PM
I just setup a dual wan group to use a failover cellular connection.  I also use dynamic dns which still updates properly. The issue I am having is when I try and access a service from inside the firewall using my dynamic dns address it doesn't connect, it doesn't work even if I use my external ip address from inside the firewall.  It still works from outside the firewall. 

(https://drive.google.com/uc?export=view&id=1dCSnVGOSNPtjYagFLXrFjUd8oAmoOPZI)
(https://drive.google.com/uc?export=view&id=1YLtldPMTz1SVwfqlB8L9i2utDobn7BWs)

 
Title: Re: Dual wan group and port forwarding
Post by: adam3914 on April 21, 2023, 07:57:43 PM
I was able to fix it by adding the lan interface to the port forward.  Hopefully this doesn't create problems.


(https://drive.google.com/uc?export=view&id=1KxwOpVLCJsUfL40jbE3frtsJsnPJuedC)
Title: Re: Dual wan group and port forwarding
Post by: patrick3000 on April 22, 2023, 09:41:15 AM
Using port forwarding on the LAN interface may work (I don't know for sure). However, the two traditional ways to access a dynamic DNS name from LAN side are to either use NAT reflection or else split DNS.

The way I've always done it is split DNS. In OPNsense, this can be done from "Services," "Unbound DNS," "Overrides." From there, you can add an override with the domain name of your dynamic DNS and whatever IP address you want it associated with (which is the same IP address that you're port forwarding to). This will ensure that the name resolves to the proper IP address when accessed on the LAN side.

There is also a way to do it with NAT reflection, and i believe there some options for configuring NAT reflection in the port forwarding menu. However, I'm not really familiar with that.