English Forums > Web Proxy Filtering and Caching

Nginx revers proxy

(1/1)

rafnizw:
I have latest VM OpnSense with Nginx plugin installed and I want to configure revers proxy that forwards traffic based on fqdn to my internal servers
Wifi Clients >>>> OpnSense >>> Internal Serwers
I need OpnSense to listen on ports 80 and 443 but on different IP than internal interface
Can someone show me examples how to configure that

Thanks,
Rafal

fabian:
Sorry, I cannot follow you. It is bound to all IP addresses so it will listen on everything. Did you forget to add a pass rule on WAN?

rafnizw:
I do not have problems with the FW rules I just need advice how to configure NGINX plugin.
So lets say I have following scenarios
Guest connect to Wifi AP and this AP is connected to OpnSense interface called Exteral
On this Exteral I need NGINX to listen only on ports 80 and 443 other must be blocked
From the other side OpnSense is connected to LAN interface called Internal
What I need is
if Guest types FQDN 1 dns points to OpnSense Exteral IP
Based on FQDN, NGINX redirects traffic to internal server on LAN interface
Similar setup for FQDN 2 >>> Server 2   etc.
I just need to see example how to configure Nginx for above example

Thanks,


fabian:
HTTP:

https://docs.opnsense.org/manual/how-tos/nginx.html

HTTPS:

Ifbyou want to terminate TLS, it is the same as HTTP. If you do not want that, you can use streams with an upstream map.

Navigation

[0] Message Index

Go to full version