• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved [Solved] Qjail add loopback IP

gpatrick

Well-Known Member


Messages: 261

#1
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.
 

Edsel

New Member

Thanks: 2
Messages: 7

#2
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?
 

glug

New Member

Thanks: 1
Messages: 4

#3
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
 
Top