OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Web request directing to web server
« previous next »
  • Print
Pages: [1]

Author Topic: Web request directing to web server  (Read 2431 times)

sairfan1

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Web request directing to web server
« on: August 10, 2022, 08:38:28 pm »
Its a learning setup, I have 3 domains registered with godaddy, I updated A record with my public static IP
On my environment I have 3 machines running web apps for each domain (i want to keep web apps on separate computers) If i port forward to any of machine's IP, I can load the website, that means everything is working good.

What i want to achieve is I want to use that single IP for multiple web servers (PCs) I want to learn how can i achieve this using OPNsense.
Logged

zz00mm

  • Newbie
  • *
  • Posts: 40
  • Karma: 2
    • View Profile
Re: Web request directing to web server
« Reply #1 on: August 10, 2022, 10:08:14 pm »
Looks like you have 3 options:

1) Port forward a different port for each domain thru the firewall to the web server for that domain. (Do this to test if the website is working thru firewall)

2) Put all the domain web pages on 1 Server, port forward thru the firewall to web server and let host headers do the work for you. (This is what I have used in the past)

3) Setup a reverse proxy that you port forward to thru the firewall and then let the reverse proxy do it's work. If you get this to work, then you could move your reverse proxy to the firewall if desired as NGINX is an option as well as traefik (traefik can be retreived by using the mimugmail repo addin)

Thats all I can provide as I'm currently working on option #3 without port forwarding at this time.

Happy firewalling
Logged

sairfan1

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Web request directing to web server
« Reply #2 on: August 11, 2022, 05:59:42 pm »
Quote
1) Port forward a different port for each domain thru the firewall to the web server for that domain. (Do this to test if the website is working thru firewall)

What i believe we can't single port forward to multiple ips

Quote
2) Put all the domain web pages on 1 Server, port forward thru the firewall to web server and let host headers do the work for you. (This is what I have used in the past)

I know it can be done, but i'm learning how to do it if we have 3 web servers separately 

Quote
3) Setup a reverse proxy that you port forward to thru the firewall and then let the reverse proxy do it's work. If you get this to work, then you could move your reverse proxy to the firewall if desired as NGINX is an option as well as traefik (traefik can be retreived by using the mimugmail repo addin)

Can we install NGINX on OPNsense and there some API to programmatically add new domains in the future?

BTW how hosting companies handle such things? do they also use reverse proxy?
Logged

sairfan1

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Web request directing to web server
« Reply #3 on: August 16, 2022, 09:46:41 pm »
Can we use Unbound DNS for outside traffic as well? if yes, how can we configure it on the OPNsense firewall, thanks
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Web request directing to web server
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2