OPNsense Forum

English Forums => General Discussion => Topic started by: kermitxyz on February 27, 2025, 09:51:20 PM

Title: Access to modem on WAN port
Post by: kermitxyz on February 27, 2025, 09:51:20 PM
I have a 4G modem as a WAN port for backup (failover) but I cannot access the configuration page of the 4G modem

The OPNsense router IP is 192.168.123.254 and all local PCs are on that subnet

The modem is attached to one of the router interfaces with static IP 192.168.100.100  and the modem has static IP 192.168.100.254

Under System: Gateways: Configuration  The 4G gateway has IP 192.168.100.254

Ping monitoring works, failover works, and I CAN ping 192.168.100.254 from an SSH session to the router.  However, I can't ping it from my desktops.  I would like to be able to access the modem via the web for monitoring.

Any advice most welcome thank you
Title: Re: Access to modem on WAN port
Post by: viragomann on February 27, 2025, 10:53:38 PM
Quote from: kermitxyz on February 27, 2025, 09:51:20 PMUnder System: Gateways: Configuration  The 4G gateway has IP 192.168.100.254
Did you check "Upstream Gateway" there? This is needed.

If so, check in Firewall > NAT > Outbound if there are automatic rules added to that interface.
Title: Re: Access to modem on WAN port
Post by: kermitxyz on February 28, 2025, 02:48:35 PM
Quote from: viragomann on February 27, 2025, 10:53:38 PM
Quote from: kermitxyz on February 27, 2025, 09:51:20 PMUnder System: Gateways: Configuration  The 4G gateway has IP 192.168.100.254
Did you check "Upstream Gateway" there? This is needed.
It was not checked, so I have now enabled it.

QuoteIf so, check in Firewall > NAT > Outbound if there are automatic rules added to that interface.
Having done the above there are no rules here, and I still can't access the device.
Title: Re: Access to modem on WAN port
Post by: viragomann on February 28, 2025, 03:27:02 PM
Outbound NAT rule are required to access the modem. If there are none you need to add it manually.

To do so you have to enable the hybrid mode at first, so that manual rules are applied.
The add a rule:
interface: <4G>
source: LAN net
destination: any
translation: interface address

If you need to run IPSec connections over this interface you also need an additional rule for dest. pot 500 and check "static port". Then move this rule above of the other one.
Title: Re: Access to modem on WAN port
Post by: kermitxyz on February 28, 2025, 09:32:37 PM

That works, but I also had to put a firewall rule on the LAN interface to allow the LAN source access to the 4G network interface.

Thank you so much for your help, much appreciated.