Any netgraph gurus out there?
I created two vnet jails with the help of the devin teske's jng scipts and example jail.conf under /usr/share/examples/jails/.
I can enter either jail using jexec
However, I cannot ping any targets from inside the jails. The jails do not appear to have ip addresses. The host machine gets it's ip addresses via DHCP. There is no active firewall on the host.
Here is the result of
and on the jails:
(jail one)
(jail two)
output of ngctl graph:
The ng0_pgserver and ng0_samba interfaces are not inheriting ip addresses from bce1bridge. I am unable to ssh into these jails or ping anything from within. Setting ng0_pgserver or ng0_samba to "UP"
Here are my jail.conf files under jail.conf.d
pgserver.conf:
samba.conf:
Any help here would be appreciated.
I created two vnet jails with the help of the devin teske's jng scipts and example jail.conf under /usr/share/examples/jails/.
I can enter either jail using jexec
However, I cannot ping any targets from inside the jails. The jails do not appear to have ip addresses. The host machine gets it's ip addresses via DHCP. There is no active firewall on the host.
Here is the result of
ifconfig -a
on the host:
Code:
bce0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
ether 78:2b:cb:02:e2:bc
inet 10.0.0.106 netmask 0xffffff00 broadcast 10.0.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
bce1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
ether 78:2b:cb:02:e2:be
inet 10.0.0.108 netmask 0xffffff00 broadcast 10.0.0.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
bce2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
ether 78:2b:cb:02:e2:c0
media: Ethernet autoselect
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
bce3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
ether 78:2b:cb:02:e2:c2
media: Ethernet autoselect
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
(jail one)
Code:
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ng0_pgserver: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=28<VLAN_MTU,JUMBO_MTU>
ether 02:a4:dc:02:e2:be
hwaddr 58:9c:fc:00:7c:54
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ng0_samba: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=28<VLAN_MTU,JUMBO_MTU>
ether 02:90:c0:02:e2:be
hwaddr 58:9c:fc:10:ff:c0
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
The ng0_pgserver and ng0_samba interfaces are not inheriting ip addresses from bce1bridge. I am unable to ssh into these jails or ping anything from within. Setting ng0_pgserver or ng0_samba to "UP"
ifconfig ng0_pgserver up
changes the output of ifconfig to show UP but otherwise has no effect.Here are my jail.conf files under jail.conf.d
pgserver.conf:
Code:
pgserver {
host.hostname = "daria.pgserver"; # hostname
path = "/ja0/pgserver"; # root directory
exec.clean;
exec.system_user = "root";
exec.jail_user = "root";
#
# NB: Below 4-lines required
#
vnet;
# netgraph
vnet.interface = "ng0_pgserver"; # vnet interface(s)
exec.prestart += "jng bridge pgserver bce1"; # bridge interface(s)
exec.poststop += "jng shutdown pgserver"; # destroy interface(s)
# if_bridge
#vnet.interface = "e0b_xxx"; # vnet interface(s)
#exec.prestart += "jib addm xxx em0"; # bridge interface(s)
#exec.poststop += "jib destroy xxx"; # destroy interface(s)
# Standard recipe
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
exec.consolelog = "/var/log/jail_pgserver_console.log";
mount.devfs; # mount devfs
# Optional (default off)
devfs_ruleset = "11"; # rule to unhide bpf for DHCP
#allow.mount; # mount /etc/fstab.xxx
#allow.set_hostname = 1; # Allow hostname to change
#allow.sysvipc = 1; # Allow SysV Interprocess Comm.
}
Code:
samba {
host.hostname = "daria.samba"; # hostname
path = "/ja0/samba"; # root directory
exec.clean;
exec.system_user = "root";
exec.jail_user = "root";
#
# NB: Below 4-lines required
#
vnet;
# netgraph
vnet.interface = "ng0_samba"; # vnet interface(s)
exec.prestart += "jng bridge samba bce1"; # bridge interface(s)
exec.poststop += "jng shutdown samba"; # destroy interface(s)
# if_bridge
#vnet.interface = "e0b_xxx"; # vnet interface(s)
#exec.prestart += "jib addm xxx em0"; # bridge interface(s)
#exec.poststop += "jib destroy xxx"; # destroy interface(s)
# Standard recipe
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
exec.consolelog = "/var/log/jail_samba_console.log";
mount.devfs; # mount devfs
# Optional (default off)
devfs_ruleset = "11"; # rule to unhide bpf for DHCP
#allow.mount; # mount /etc/fstab.xxx
#allow.set_hostname = 1; # Allow hostname to change
#allow.sysvipc = 1; # Allow SysV Interprocess Comm.
}