Jails and IP addressing

If I have an external firewall with an internal IP of 192.168.1.1
and have my FreeBSD host that is running a few jails with
Apache, mail, nginx, etc in separate jails, then how do I
use addressing on the FreeBSD host?

Can the nginx jail have an IP of 192.168.1.2 and the jail with mail
have an IP of 192.168.1.3 and be reached directly from the
firewall or is that not right since they're on loopback?

Does the host need to have a 192.168.1.x IP and then redirect
to the correct jail?

Doing this with Solaris Zones and VirtualBox isn't a problem,
and I can setup jails, but the addressing is not so clear.

Thanks.
 
Each jail will be an IP on your 192.168.1/24 network. (They will be aliases on the ethernet adapter in your host.)

Example:
  • host system: 192.168.1.5
  • Apache jail: 192.168.1.101
  • sendmail jail: 192.168.1.102
  • nginx jail: 192.168.1.103

Your firewall/NAT device just needs to forward requests to the proper jail IP and service port.
 
Back
Top