Port Forwarding Issue

Started by user147, July 28, 2023, 09:41:15 PM

Previous topic - Next topic
I am attempting to forward ports 80 and 443 to a reverse proxy. Here are the issues and what I have tried so far, any advice would be appreciated.

After failing to be able to connect to the reverse proxy via WAN IP, I set the port forwarding to simply point to the LAN IP on the OPNsense router. I was successfully able to access the router webpage using the WAN IP, showing that port forwarding is working. I can see in the logs that the NAT works, replacing the WAN IP with the router IP.

When I change the port forwarding to point to the reverse proxy IP, I cannot access it via WAN IP. The reverse proxy is working, since when I access it on LAN via it's IP address, I get its welcome page (I have not set it up, not until I figure out the port forwarding). So I know that port forwarding does work, as I can access the router using WAN IP. And I know the reverse proxy is working, as I can access it on LAN.

What am I missing here? When I have port forwarding pointing to the reverse proxy, I can see the NAT working. I don't see any firewall rules that would be blocking the traffic, as I currently only have the default rules that OPNsense creates. I have deleted the port forward rules and redone it several times, always making sure the ports and IPs are correct. I just cannot get it to work, even after double checking my knowledge with several articles and videos, as well as searching here for people having the same problem.

Any advice what I should be looking for?

Did you remember to change the OPN UI to listen to alternative ports?

Hello, yes, I was sure to change the port for the GUI.

OK.
Could you share your port forward rule, maybe something wrong or missing. It should be something like this:

Source:
Interface Proto Address Ports
WAN         TCP         *         *    
Destination:
Address                Ports
WAN address       80
NAT:
IP                     Ports                Description
local-ip             80                       your-description

Test it from outside i.e. a mobile phone on the mobile network.
It would be useful to describe the setup a bit more, like if the reverse proxy is on the LAN or on OPN.
By the way, OPN includes nginx and haproxy of you wanted to use those instead.