Jails - vnet- netgraph

petru garstea peter.garshtja at ambient-md.com
Sun Jan 24 23:20:37 UTC 2021


Greetings FreeBSD community,


     OS: FreeBSD sun 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC  amd64


I am trying to build a netgraph vnet jail with support of official jng 
script that comes with FreeBSD and developed by Devin Teske.

jail.conf file

netgraph {
   devfs_ruleset = 13;
   enforce_statfs = 2;
   exec.clean;
   exec.consolelog = /var/log/bastille/netgraph_console.log;
   exec.start = '/bin/sh /etc/rc';
   exec.stop = '/bin/sh /etc/rc.shutdown';
   host.hostname = netgraph;
   mount.devfs;
   mount.fstab = /usr/local/bastille/jails/netgraph/fstab;
   path = /usr/local/bastille/jails/netgraph/root;
   securelevel = 2;

   vnet;
   vnet.interface = e0b_bastille0;
# exec.prestart += "jib addm bastille0 re0";
# exec.poststop += "jib destroy bastille0";
   exec.prestart += "jng bridge netgraph re0";
   exec.poststop += "jng shutdown netgraph" ;
}

When I start the jail, netgraph subsystem raise the following exception

ngctl: send msg: No such file or directory
jail: netgraph: jng bridge netgraph re0: failed

I tried also to create the netgraph bridge with not using jng script

ngctl mkpeer re0: bridge lower link0
ngctl: send msg: No such file or directory

 From what I found it looks it used to work on FreeBSD 11.x and stopped 
working in version 12.

Any thoughts ?

Please advise


Cheers,

Petru Garstea



More information about the freebsd-jail mailing list