Keine Kommunikation von VNET Jails zu anderen Jails auf Host

h^2

hat ne Keule +1
Ich habe bis jetzt meistens nur klassische Jails betrieben, aber die meisten neuen Jails sind jetzt VNET jails, durch bastille eingerichtet. Bei meinem aktuellen Setup, habe ich das Problem, dass ich keine Verbindung von den VNET jails zu anderen Jails (VNET oder ohne) oder dem Host aufbauen kann. Da bekomme ich immer Time-Outs. Alle Ziele außerhalb des Rechners erreiche ich aber von den VNET Jails. Die Jails ohne VNET (auch durch Bastille eingerichtet), habe diese Probleme nicht.

Ich verwende aktuell keine Firewall, alle IP-Adressen sind im selben Subnetz. Der Host ist als default-route in den VNET Jails eingerichtet und hat net.inet.ip.forwarding=1. Die VNET Jail können ja auch, wie gesagt, "raus-kommunizieren", nur eben nicht auf dem Rechner, selbst ein ping gegen den Host gibt ein time-out; auch ein ping vom Host an ein VNET Jail.

Ich kann gerne mehr Informationen posten, aber dachte ich frage erstmal. Es scheint, als würde ich etwas übersehen, dass vielleicht offensichtlich ist, wenn VNET Jails besser kennt als ich.
 
OK, vielleicht ein paar mehr Details

Physisches device auf dem Host ist ix0

Es gibt eine Bridge:
Code:
cloned_interfaces="bridge0"
ifconfig_bridge0="addm ix0 up"
Bastille legt für jedes vnet-Jail ein e0a_JAILNAME device auf dem Host an, dieses hat keine IP-Adresse. Das hat mich erst überrascht, aber soll anscheinend so sein:
Code:
e0a_extportal: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vnet0 host interface for Bastille jail extportal
        options=60000b<RXCSUM,TXCSUM,VLAN_MTU,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 58:9c:fc:10:44:c0
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Und ein e0b_JAILNAME innerhalb des VNET Jails; das dann aber zu vnet0 umbenannt wird; Route ist auf die physische IP des Hosts gesetzt:
Code:
ifconfig_e0b_extportal_name="vnet0"
ifconfig_vnet0="inet 192.168.3.201/24"
defaultrouter="192.168.3.190"

Mir ist insgesamt nicht klar, wie der Host überhaupt von der "internen" IP des VNET Jails erfahren soll. Für die nicht-VNET-Jails habe ich ja extra Routen, die sagen, dass die IP-Adresse lokal aufgelöst werden soll und nicht über ix0. Diese fehlen aber für die VNET Jails.

Ich habe testhalber mal e0a_extportal eine IP gegeben, die kann ich dann vom Host auch pingen. Das verändert aber nicht der Verhalten aus dem Jail heraus (kann den Host oder andere Jails immernoch nicht erreichen).
 
Hast du mal ein komplettes ifconfig des Hosts?

Code:
ix0: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        options=e538bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS>
        ether 98:b7:85:1e:9b:37
        inet 192.168.3.190 netmask 0xffffff00 broadcast 192.168.3.255
        inet 192.168.3.193 netmask 0xffffff00 broadcast 192.168.3.255
        inet 192.168.3.194 netmask 0xffffff00 broadcast 192.168.3.255
        inet 192.168.3.191 netmask 0xffffffff broadcast 192.168.3.191
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
bridge0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        options=10<VLAN_HWTAGGING>
        ether 58:9c:fc:10:6a:fa
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        bridge flags=0<>
        member: e0a_musicd flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                port 16 priority 128 path cost 2000 vlan protocol 802.1q
        member: e0a_iportal flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                port 13 priority 128 path cost 2000 vlan protocol 802.1q
        member: e0a_extportal flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                port 10 priority 128 path cost 2000 vlan protocol 802.1q
        member: e0a_extmedia flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                port 7 priority 128 path cost 2000 vlan protocol 802.1q
        member: ix0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                port 1 priority 128 path cost 55 vlan protocol 802.1q
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
e0a_extmedia: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vnet0 host interface for Bastille jail extmedia
        options=60000b<RXCSUM,TXCSUM,VLAN_MTU,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 58:9c:fc:10:23:e9
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
e0a_extportal: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vnet0 host interface for Bastille jail extportal
        options=60000b<RXCSUM,TXCSUM,VLAN_MTU,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 58:9c:fc:10:fc:ea
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
e0a_iportal: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vnet0 host interface for Bastille jail iportal
        options=60000b<RXCSUM,TXCSUM,VLAN_MTU,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 58:9c:fc:10:44:c0
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
e0a_musicd: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vnet0 host interface for Bastille jail musicd
        options=60000b<RXCSUM,TXCSUM,VLAN_MTU,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 58:9c:fc:10:55:6e
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Danke!

edit: die IPs direkt auf ix0 sind die Jails ohne VNET
 
Wow, ich habe es mit ChatGPT gelöst, das war wirklich hilfreicher als gedacht. Hier zur Dokumentation:


----

ich schrieb:
I have a FreeBSD15 server with several jails. Up until now, these were classic jails, but I have added a VNET jail now using the bastille utility. This works absolutely fine, however, I cannot reach the host or the old jails from within the VNET jail, i.e. no TCP or UDP connections can be established, not even ping. To clarify: the VNET jail has an an IP on the external interface of the host via the bridge, and it can reach other hosts on the LAN as well the WAN, it just cannot connect to anything on its own host. No firewall is being used and no NAT. What could be the problem?

ChatGPT:

1767172860650.webp

1767172953835.webp


ich schrieb:
I have created a second VNET jail on the same bridge and the two VNET jails can speak to each other—which confirms your analysis, I think. You are also correct, that the host IPs is set on the physical interface and not the bridge. However, if I add (for testing purposes) an IP from the subnet to the bridge interface, the VNET jails still cannot reach it.

ChatGPT:

1767173033520.webp

1767173071021.webp
 
Nun war die KI schneller als ich. :) Also ja, IP-Adressen dürfen niemals auf die Member, sie müssen auf die Bridge. Die Möglichkeit überhaupt Adressen auf Member setzen zu können sollte mit 15.0 abgeschafft werden, aber der Aufschrei war zu groß. Nächster Versuch mit 16.0.
 
Die Möglichkeit überhaupt Adressen auf Member setzen zu können sollte mit 15.0 abgeschafft werden, aber der Aufschrei war zu groß. Nächster Versuch mit 16.0.
Heißt das, Hetzner-User müssen mit 16.0 auf einen anderen Hoster umsteigen? Ich habe verschiedene Setups ausprobiert, auch eines von Dan Langille, das dem von der KI vorgeschlagenen entspricht.

Am Ende leaken immer die MAC-Adressen der Jails ins LAN von Hetzner und dann bekommt man von denen eine Abmahnung, dass man das innerhalb einiger Tage korrigieren müsse. Im Netz habe ich weit und breit noch nie eine Lösung dafür gesehen.

Ich behelfe mir mit einem VLAN, das Member der Bridge ist und das eigene IPv4 und IPv6 Adresse hat, die im internen Netz der Jails liegen. Mit pf NATte ich dann den Traffic zum internen Netz (VLAN und Jails).

Wenn jemand eine korrekte Lösung hierfür kennt (die auch mit 16.0 funktionieren wird): Bitte postet sie hier!!!
 
Das ist ein Sysctl: net.link.bridge.member_ifaddrs In 15.x ist es 1, also es können IP-Adressen auf Member gesetzt werden In 16.x wird es voraussichtlich auf 0 stehen aber man kann es sicher zurücksetzen. In 15.0 ist die Bridge übrigens auch voll VLAN-fähig geworden, aber ich hab damit noch nichts gemacht.
 
Zurück
Oben