# Jail with static IP.



## dns (May 11, 2012)

Hello, 

How I can create jail server own network interface and different MAC address. Also I have problem with jails restarting. On boot jail start success, but *I* can't stop jail with `/etc/rc.d/jail stop` (No PID file found, but jail is running.)

If *I* run `/etc/rc.d/jail restart` *I* found two jails in command *jls*.

```
jail_set_hostname_allow="YES"
jail_enable="YES"
jail_list="serv"
jail_interface="rl0"
jail_devfs_enable="YES"
jail_procfs_enable="YES"
# settings per jail listed in jail_list
jail_serv_rootdir="/jail"
jail_serv_hostname="serv"
jail_serv_ip="192.168.0.3"
jail_serv_devfs_ruleset="devfsrules_jail"
```


----------



## SirDice (May 11, 2012)

Changes are in red

```
jail_set_hostname_allow="YES"
jail_enable="YES"
jail_list="serv"
# settings per jail listed in jail_list

jail_[color=red]serv_[/color]interface="rl0"
jail_[color=red]serv_[/color]devfs_enable="YES"
jail_[color=red]serv_[/color]procfs_enable="YES"

jail_serv_rootdir="/jail"
jail_serv_hostname="serv"
jail_serv_ip="192.168.0.3"
jail_serv_devfs_ruleset="devfsrules_jail"
```


----------



## dns (May 12, 2012)

Hi, thanks. It work*s*. 

Can you give me more information whether it is possible to create a virtual interface with its own ether address and static IP different of my ext interface? I want to use this VLAN interface for a jail. 

Thanks.


----------



## da1 (May 12, 2012)

VIMAGE
http://bsdbased.com/2009/12/06/freebsd-8-vimage-epair-howto


----------

