Rule to let apache reverse proxy on OPT1 access hosts on LAN

Started by yds, March 16, 2022, 02:13:07 AM

Previous topic - Next topic
Hi.  Trying to set up a rule that will let a reverse proxy I have set up on my Apache web server running on a host on my OPT1 network, access a host on my LAN network.  I have my reverse proxy accept an url of myhost.mydomain.com and redirect it to host:port number on my LAN (eg: 192.168.1.5:8080).   I've successfully set up a NAT port forward to direct all HTTP traffic to my webserver on OPT1.   But for those url's that are supposed to redirect to a host on my LAN, it doesn't get through, and I'm not clear if I need to set a rule on OPT1 to let the redirect out, or on my LAN to let the redirect in. 

I had it all set up on an older version of OPNsense, which I accidentally borked during an upgrade.  :( Unfortunately, I didn't create a backup, and I set it up so long ago I've forgotten how I did it.

Any help appreciated!!

Ok.  I think I have figured it out.  Took a bit of experimenting and reading.   Key I think was unchecking the "Block private networks" button on the OPT1 interface config.

Then the rule I set up on the OPT1 interface looked like this:

Action: Pass
Interface: OPT1
Direction: in
Protocol: TCP/UDP
Source: OPT1 net
Destination: Single Host - 192.168.1.5
Port: From 8080 To 8080

That seemed to work.   If any experts out there see any issues with my setup, please let me know.