I'm using igb0 as well. does the ip need to be freenas or what I pick for the jail? I used an unassigned one for the jail. haven't touched any other settings.
Sent from my ONEPLUS A3000 using Tapatalk
igb0 is name of your FreeNAS network adpater, the ip is the address you want to give to your jail (on the same subnet as the ip of your FreeNAs box).
Did you check connectivity in your jail when portsnap failed? You cannot
ping
from inside the jail unless the jail's "allow_raw_sockets" property has been set to 1, e.g:
iocage set allow_raw_sockets=1 LMSjail
In this example, FreeNAS starts with no other jails or virtual machine's running and em0 is the network adapter name with ip address 192.168.0.114:
Code:
root@freenas:/ # ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 52:54:00:cc:71:92
hwaddr 52:54:00:cc:71:92
inet 192.168.0.114 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
A jail is created using
iocage create -n LMSjail ip4_addr="em0|192.168.0.103/24" -r 11.1-RELEASE
and then started
iocage start LMSjail
The jails' ip address will be 192.168.0.103 and it creates an alias or "shared ip" on the Freenas adapter em0:
Code:
root@freenas:/ # ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 52:54:00:cc:71:92
hwaddr 52:54:00:cc:71:92
inet 192.168.0.114 netmask 0xffffff00 broadcast 192.168.0.255
inet 192.168.0.103 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
Notice em0 now has two ip addresses. This is the simplest form of networking for an iocage jail with no virtual network and the jail's vnet property should be off, check with
iocage get vnet LMSjail
.
You can execute commands within the jail from the FreeNAS host, e.g to check the network config in the jail use
iocage exec LMSjail ifconfig
Code:
root@freenas:/ # iocage exec LMSjail ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 52:54:00:cc:71:92
hwaddr 52:54:00:cc:71:92
inet 192.168.0.103 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
groups: lo