jails jail: /etc/jail.conf line 3: ip4.addr: syntax error

Hello. I tried to create jail by handbook on page Chapter 16. Jails. I created /usr/etc/jail.conf as

Code:
shumbely {
    host.hostname = www.shumbely.com           # Hostname
    ip4.addr = 192.168.1.40;                   # IP address of the jail
    path = "/usr/home/jails/shumbely";         # Path to the jail
    mount.devfs;                               # Mount devfs inside the jail
    exec.start = "/bin/sh /etc/rc";            # Start command
    exec.stop = "/bin/sh /etc/rc.shutdown";    # Stop command

}

run " service jail start shumbely" -

result
Starting jails: cannot start jail "shumbely":
jail: /etc/jail.conf line 3: ip4.addr: syntax error


What about error here? Line 3 is "ip4.addr = 192.168.1.40;"?
 
I don't want to create a separate topic, so I'll write here.
Given:
1. FreeBSD 14.2 on stripeZFS.
2. A regular PC (host) with one network interface that goes to the Internet provider:
$ ifconfig re0
Bash:
re0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 00:34:53:9e:e5:c5
    inet 172.28.234.142 netmask 0xffffff00 broadcast 172.28.234.255
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
3. I did everything according to Chapter 17, I did everything step by step.
4. I'm creating a classic jail. I want to run Firefox in the jail.
5. I get syntax errors on:
$ sudo service jail start jff
5.1.
Bash:
Starting jails: cannot start jail  "jff":
jail: /etc/jail.conf line 14: interface: syntax error
.
5.2.
Bash:
Starting jails: cannot start jail  "jff":
jail: /etc/jail.conf line 13: ip4: syntax error
.
6.
cat /etc/jail.conf
Bash:
// jail for firefox;
// *** configuration ***
jff     {
        exec.start = "/bin/sh /etc/rc";
        exec.stop = "/bin/sh /etc/rc.shutdown";
        exec.consolelog = "/var/log/jail_console_${name}.log";
allow.raw_sockets;
        exec.clean;
mount.devfs;
host.hostname = "${name}";
path = "/usr/local/jails/containers/${name}";
ip4.addr = 172.28.234.142
ip4 = inherit;
interface = re0;
        }
 
But if it happens like this:
Bash:
ip4.addr = 172.28.234.142;
ip4 = inherit;
interface = re0;
then the network "falls" both on the host itself and in the jail itself.
This can be fixed by stopping the jail and restarting the entire network:
$ sudo service netif restart && sudo service routing restart
 
Back
Top