FreeBSD as a router

My PC has 3 NICs and I want to use it as a router but also have a couple of web servers running in jails.

If the WAN connection goes to NIC1 and NIC2 be the DMZ while I have NIC3 used for the reverse proxy? NIC2 and NIC3 would both be plugged into a hub.

So ISP on NIC1 xxx.xxx.xxx.xxx and NIC2 would then become something like 192.168.1.1 while NIC3 would be 192.168.1.10. Then jails would be something like 10.0.0.2, 10.0.0.3.

Plausible and doable?
 
If you want to route traffic between NIC2 and NIC3 they cannot be in the same subnet.
 
Thank you.

In place of the hub what about a switch and would I need to use separate VLANs for nic2 and nic3?
 
What interface would I alias for the reverse proxy if I didn't use NIC3? NIC2 goes to a hub and i have a windows machine to connect, and the FreeBSD machine will also be a WAP for a laptop.
 
Err... Nobody uses hubs anymore, they're all switches these days.
 
I have an old hub and am cheap...use what I have. I can buy a switch, so replace hub with switch. What alias is used for the reverse proxy if I don't use NIC3?
 
Bind the reverse proxy to NIC1 (WAN connection) and have it proxy its requests to the webserver on the NIC2 network. There's no need for aliases.

If you're going to run the reverse proxy and the webserver itself on the same box you'll only need 1 NIC.
 
Back
Top