# Firewall + DNS + NAT + DHCP



## gpatrick (Oct 21, 2009)

Currently I have a WRT54GS2 Linksys wireless router and have my FreeBSD server plugged into a wired port on the router.

The FreeBSD server has multiple jails for web servers and a database and some other jails.

Would it be possible to setup a FreeBSD server that is a firewall + dns + nat + dhcp and also set it up as a WAP for my wireless laptop?  In addition I still want my jails running on the server.

If the server with the jails is also acting as a router, then would that work?

I have a reverse proxy and that goes to some web servers in different jails.  Currently I have an alias to the physical interface, but how would it be if the router was on the same machine?

Example:

ISP ---> cable modem ---> FreeBSD (fw/nat/dns/dhcp/wap) ---> #machine would then have multiple jails on lo1 with private IP's like 10.0.0.100, 10.0.0.101, etc.


----------



## sprewell (Nov 17, 2009)

Of course it can be done, I quickly found two tutorials within seconds of googling it.  You might need some extra configuration for your jails, but maybe not.


----------



## SirDice (Nov 17, 2009)

gpatrick said:
			
		

> The FreeBSD server has multiple jails for web servers and a database and some other jails.
> 
> Would it be possible to setup a FreeBSD server that is a firewall + dns + nat + dhcp and also set it up as a WAP for my wireless laptop?  In addition I still want my jails running on the server.


Yes and yes.



> If the server with the jails is also acting as a router, then would that work?


Yes.



> I have a reverse proxy and that goes to some web servers in different jails.  Currently I have an alias to the physical interface, but how would it be if the router was on the same machine?


Exactly the same.


----------

