# Qjail on FreeBSD 10



## andrewm659 (Nov 4, 2014)

I am trying to cut my teeth on setting up jails, and trying to make it almost as easy as possible. However I am having some trouble. I have jail set up, I have created one, but I have read that qjail which will be the successor to ezjail can help create jailed environments. Has anyone used this? I am getting the following errors on my test system at home. Please advise.

```
root@asm-fbsd:~ # qjail create -n em0_alias1 -f ssh-default testdb -4 10.150.1.201
Error, an ip address on the command is nolonger valid,
Code -4 for IPv4 IP addresses and -6 for IPv6 IP addresses
root@asm-fbsd:~ # qjail create -n em0_alias1 -f ssh-default testdb -4
Error, an ip address on the command is nolonger valid,
Code -4 for IPv4 IP addresses and -6 for IPv6 IP addresses
root@asm-fbsd:~ # qjail create -n em0_alias1 -f ssh-default testdb
Entered -n interface device name is not valid.
root@asm-fbsd:~ # qjail create -n em0 -f ssh-default testdb
Error; An -4 or -6 IP address is mandatory.
root@asm-fbsd:~ # qjail create -n em0 -f ssh-default testdb -4 10.150.1.201
Error, an ip address on the command is nolonger valid,
Code -4 for IPv4 IP addresses and -6 for IPv6 IP addresses
root@asm-fbsd:~ #
```


----------



## SirDice (Nov 4, 2014)

No, qjail is not a successor to ezjail. They're simply two different solutions to manage jails. They work quite differently.


----------



## wblock@ (Nov 4, 2014)

qjail is a fork of ezjail.  As far as it being a successor, it would be very surprising if the creator of ezjail said that.


----------



## andrewm659 (Nov 4, 2014)

*O*k, well, how about the error *I*'m getting, thoughts?


----------



## SirDice (Nov 4, 2014)

Remove the -4 from the command.


----------



## andrewm659 (Nov 4, 2014)

```
root@asm-fbsd:~ # qjail create -n em0 -f ssh-default testdb 10.150.1.201
Error, an IP address on the command is no longer valid, Code -4 for IPv4 IP addresses and -6 for IPv6 IP addresses
root@asm-fbsd:~ #
```


----------



## SirDice (Nov 4, 2014)

Try this: `qjail create -f ssh-default testdb 'em0|10.150.1.201'`


----------



## andrewm659 (Nov 4, 2014)

```
root@asm-fbsd:~ # qjail create -f ssh-default testdb 'em0|10.150.1.201'
Error, an ip address on the command is nolonger valid,
Code -4 for IPv4 IP addresses and -6 for IPv6 IP addresses
root@asm-fbsd:~ #
```


----------



## Remington (Dec 14, 2014)

When you type `qjail` and you'll see the proper syntax.  This works.

`qjail create -n em0 -f ssh-default -4 10.150.1.201 testdb`


----------

