Hi all,
I am trying to know more about vnet vimage. It was suggested a link zfs and vnet when I was researching about jail for a server.
After testing few approaches why if I do use this code on jail.conf
I have the interface on jail
On host I did not see the interface ng0_nginx.
But on my testings, if I go to command and
The result is the interface available in both, host and jail.
Host
Jail
I also tried
- virtual.lan script /usr/share/examples/netgraph
- vnet https://github.com/genneko/freebsd-vimage-jails
- ngctl commands
All of them give me same results, showing the ng0_nginx available in jail and host.
Is it wrong running from host? I use Nat/pf to get internet inside jail, is it right/normal way to do this?
Thanks
Edit: typo
I am trying to know more about vnet vimage. It was suggested a link zfs and vnet when I was researching about jail for a server.
After testing few approaches why if I do use this code on jail.conf
Code:
exec.prestart += "jng bridge nginx ena0";
exec.poststop += "jng shutdown nginx";
I have the interface on jail
Code:
ng0_nginx: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=28<VLAN_MTU,JUMBO_MTU>
ether 0a:00:dd:86:47:ba
inet6 fe80::1427:e888:767c:dce1%ng0_nginx prefixlen 64 scopeid 0x4
inet 172.18.0.5 netmask 0xffffff00 broadcast 172.18.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
On host I did not see the interface ng0_nginx.
But on my testings, if I go to command and
Code:
# jng bridge nginx ena0
# ifconfig ng0_nginx 172.18.0.5/24
The result is the interface available in both, host and jail.
Host
Code:
ng0_nginx: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=28<VLAN_MTU,JUMBO_MTU>
ether 0a:00:dd:86:47:ba
inet6 fe80::1427:e888:767c:dce1%ng0_nginx prefixlen 64 scopeid 0x4
inet 172.18.0.5 netmask 0xffffff00 broadcast 172.18.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Jail
Code:
ng0_nginx: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=28<VLAN_MTU,JUMBO_MTU>
ether 0a:00:dd:86:47:ba
inet 172.18.0.5 netmask 0xffffff00 broadcast 172.18.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
I also tried
- virtual.lan script /usr/share/examples/netgraph
- vnet https://github.com/genneko/freebsd-vimage-jails
- ngctl commands
All of them give me same results, showing the ng0_nginx available in jail and host.
Is it wrong running from host? I use Nat/pf to get internet inside jail, is it right/normal way to do this?
Thanks
Edit: typo