Setting IP address in jail

Simple as that, in the second case, your jail will just use the host's address. In either case, the jail will use the host's network interface.

For dhcp, you need the jail to have its own network interface. This is possible as well, using the vnet option. you can for example configure an epair(4) interface and give the b end to the jail with vnet.interface. Of course, you will need to bring up the a end on the host and setup routing or put it in a bridge(4) for this to work.
 
Simple as that, in the second case, your jail will just use the host's address. In either case, the jail will use the host's network interface.
If I have ip4 = inherit;, jls does not show an IP address, is this normal?
Also, I can't see where it gets its hostname from. /etc/jail.conf contains host.hostname = "Sname"; but the hostname shown when running jls it neither shows 11-1 or the host's hostname, so where does it come from?
 
If I have ip4 = inherit;, jls does not show an IP address, is this normal?
Code:
     ip4     Control the availability of IPv4 addresses.  Possible values are
             "inherit" to allow unrestricted access to all system addresses,
             "new" to restrict addresses via ip4.addr, and "disable" to stop
             the jail from using IPv4 entirely.  Setting the ip4.addr
             parameter implies a value of "new".

but the hostname shown when running jls it neither shows 11-1 or the host's hostname, so where does it come from?
Typo? Shouldn't that be $name? The $name refers to the name you gave the jail in jail.conf.
 
Back
Top