Modify jail IP without restarting

Jason Hellenthal jhellenthal at dataix.net
Fri May 4 16:47:49 UTC 2012



On Fri, May 04, 2012 at 12:30:51PM +0200, Miroslav Lachman wrote:
> Darryl Yeoh wrote:
> > On Fri, May 4, 2012 at 5:55 PM, Darryl Yeoh<drl at bsd.my>  wrote:
> >
> >> Hi guys,
> >>
> >> I'm on FreeBSD 9-STABLE/amd64 at the moment and is there a way to
> >> add/modify a jail's existing IP address without restarting jail ?
> >>
> >> Initially the jail was configured with 5 IP addresses. And now we have
> >> clients requesting additional IP addresses. A bunch of users
> >> are in the jail at the moment and I don't want to restart the jail just
> >> cause of this.
> 
> Yes, you can add / change / remove IP addresses on running jails. You 
> must use newer syntax of jail(8) command with param=value.
> 
> short example:
> 
> jail -m ip4.addr="192.168.1.87,192.168.1.88" jid=1

If you run this command on the jail (at least of stable/8 "now") it will
replace the current IP address that is already associated with the jail.
Be sure to add all current ip addresses to this list before running or
your clients are going to be cut off mid connection.

> 
> where ip4.addr is the list of IP addresses you want to assign to a jail 
> and jid is the JID of the jail. If you are using named jails, you can 
> use name=myjail instead of jid=n
> 
> You can list all current parameters by jls -nqs (see man jls)
> 
> Miroslav Lachman
> _______________________________________________
> freebsd-jail at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-jail
> To unsubscribe, send any mail to "freebsd-jail-unsubscribe at freebsd.org"

-- 

 - (2^(N-1))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-jail/attachments/20120504/26f22e61/attachment.pgp


More information about the freebsd-jail mailing list