Solved [Solved] Qjail add loopback IP

I've created a loopback IP lo0 of 127.0.0.2 and want to assign it to a qjail created jail. The jail also has a routable IP 192.168.1.20 on em0 to reach the Internet, but I don't want 127.0.0.2 to do that. But when I use qjail create -n em0 testjail 192.68.1.20,127.0.0.2 of course it adds 127.0.0.2 to em0 and also to lo0. It doesn't allow a -n em0 <ip> -n lo0 <ip> and gives a syntax error.
 
Re: Qjail add loopback IP

I don't know how qjail assigns the IP adresses. But why don't you assign those IP addresses to the correct interfaces before creating the jail?
 
Late answer, but Google brought me here when I ran into the same problem. With an existing jail, you can use this command:
qjail config -4 "192.168.1.20,lo0|127.0.0.2" my_jail_name
 
Back
Top