# Best approach for managing network address of ezjails?



## Toolforger (Feb 1, 2020)

Hi all,

I want to experiment with jails, creating and throwing them away at will.
I want to avoid having to manually assign LAN or loopback IP addresses (that would be a distraction from what I actually want to do with the jails).

There is a DHCP server in the physical LAN.
I see two basic networking options: (1) each jail is visible with its own IP address and host name in the LAN, (2) the FreeBSD host acts as a router for its jails. I don't care much, except which of them is easier to setup and operate


----------



## Lamia (Feb 1, 2020)

Would you want to search the forum for some jail configurations?


----------



## Toolforger (Feb 1, 2020)

Lamia said:


> Would you want to search the forum for some jail configurations?



I wouldn't want to because I wouldn't know what keywords to search for - or if you will, because there are too many keyword combinations to try.


----------



## Lamia (Feb 1, 2020)

I would start with the lowest possible number - say two words - and an example would be "jail network".


----------



## Toolforger (Feb 1, 2020)

Lamia said:


> I would start with the lowest possible number - say two words - and an example would be "jail network".



No useful results on the first page, sorry.


----------



## getopt (Feb 1, 2020)

See /usr/share/examples/jails/rc.conf.jails

```
#
# To allow dhclient(8) to work inside a jail, make sure the following appears
# in /etc/devfs.rules (which should be created if it doesn't exist):
#
# [devfsrules_jail=11]
# add include $devfsrules_hide_all
# add include $devfsrules_unhide_basic
# add include $devfsrules_unhide_login
# add path 'bpf*' unhide
#
```


----------



## Lamia (Feb 2, 2020)

See examples in /usr/share/examples/jails for vnet configs.

See an example in http://www.scottro.net/qnd/qnd-ezjail.html that uses alias.


----------

