reverse proxy for website

no_connection

Patron
Joined
Dec 15, 2013
Messages
480
I want to have a proxy sitting in between webservers and internet so any request for a certain domain or subdomain hit a specific webserver.
Right now there is only one website running on the IP but that will not last forever.

I did this long ago with varnish but when trying to get that running it needs dependencies no longer available so I have not gotten one running yet.

Is there any (free) solutions to handle something like this?

As long as it can be shoved in a VM it could work, so any complete router package or small linux/bsd could work. As long as it works and is "easy" to setup and manage.
 
Joined
Jan 4, 2014
Messages
1,644

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Apache 2.4 works quite well. I installed it in a standard ("fat") jail and used dehydrated to manage SSL certificates from Letsencrypt.

But: pkg install varnish6 or pkg install varnish4 in a jail should just work. Are you possibly still running 11.2? In that case you will not be able to install any packages until you upgrade to 11.3.

FreeBSD 11.2 is unsupported since October 31, 2019.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Is there any (free) solutions to handle something like this?
My Caddy writeup will run in a jail. pfSense has a HAProxy package available which does what you describe, and I'm pretty sure OPNSense does as well; they have point-and-click GUIs for configuring them. Nethserver can act as a router and a reverse proxy, and once again has a web GUI that will configure it. In a jail or VM, Caddy, Apache, Nginx, HAProxy, or Traefik would all do what you're looking for, though I think the config file syntax is simplest with Caddy. All this stuff is free.
 

no_connection

Patron
Joined
Dec 15, 2013
Messages
480
A little update. I had pfSense in a VM with HAProxy already installed, not entirely sure when but it looked pretty neat for a solution. So I made a new install. But latest version of pfSense don't have any package support, a ticket from 2019 says they have not enabled it due to "testing" so this is intended behaviour. The VM I had no longer see any new packages ether. So that kinda bricks pfSense for any use(IMO).

OPNSense looks nice and have a working package of it so I will continue testing with that.
I had some wierd issue where DHCP requests from one vlan jumped to another vlan resulting in users getting wrong IP, it might have been OPNSense or a bug in UI LocoM2 AP, had to do a lot of things at the same time to get it to work.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
That bug doesn’t mean what you seem to think it means, and the current release of pfSense most definitely does have packages. Use OPNSense if you like, but don’t spread FUD about other products.
 

no_connection

Patron
Joined
Dec 15, 2013
Messages
480
Well none of them loaded, not on a running that used to work or a new fresh install.
And since the error message is the exact same as in the ticket and version is the same, how would I differentiate?
Sorry if you think it is FUD but turned out to be coincidence since it's working now but not earlier today.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Sorry if you think it is FUD
It certainly looked like it, and honestly you pretty badly misread that bug report, given that the version was reported as "2.4.5-DEVELOPMENT (amd64)". Version 2.4.5 was pre-release at that time, hence the statement that that version was in testing.

There are certainly valid reasons to prefer one over the other--the behavior of the pfSense folks when OPNSense forked was simply inexcusable, for one. But this isn't one of them, and it sounds like you're now seeing working packages in pfSense too.
 

John Doe

Guru
Joined
Aug 16, 2011
Messages
635
A little update. I had pfSense in a VM with HAProxy already installed, not entirely sure when but it looked pretty neat for a solution. So I made a new install. But latest version of pfSense don't have any package support, a ticket from 2019 says they have not enabled it due to "testing" so this is intended behaviour. The VM I had no longer see any new packages ether. So that kinda bricks pfSense for any use(IMO).

OPNSense looks nice and have a working package of it so I will continue testing with that.
I had some wierd issue where DHCP requests from one vlan jumped to another vlan resulting in users getting wrong IP, it might have been OPNSense or a bug in UI LocoM2 AP, had to do a lot of things at the same time to get it to work.
111111.JPG

with 2.4.5 it works
 

no_connection

Patron
Joined
Dec 15, 2013
Messages
480
Yes, it was down for half a day with me spending quite a few hours reinstalling and reconfigure before giving up. With no info to go on other than an old reddit thread and that ticket, so yea, led to post being written in a little more edgy way then deserved.
 
Top