SolarCatcher
Well-Known Member
Ich komme nicht weiter - IPv6 in meiner Jail ist absolut wackelig und bricht immer wieder - und dann dauerhaft - ab. Ich habe mir diesen Thread zum gleichen Thema durchgelesen, aber anders als dort habe ich eine Jail mit VIMAGE (also einem vnet-Interface). Dieses habe ich per bridge mit dem externen NIC verbunden. IPv4 klappt tadellos. IPv6 nur selten. Daher vermute ich ein Problem mit icmp6. Aber ich komme nicht auf die Lösung. Ich versuche mal vereinfacht das Setup wiederzugeben.
Ich habe drei andere Jails auf die klassische Methode über das Loopback interface verbunden - dies werden per NAT/Redirect angebunden und sind (bei Bedarf) unter <ipv4_primär> und <ipv6_primär> wunderbar von außen erreichbar. Für die vierte benötige ich aber VIMAGE (für Redis). Diese Jail hat ihre eigenen öffentlichen Adressen (<ipv4_sekundär> und <ipv6_sekundär>).
IFCONFIG DES HOSTS
IFCONFIG DER VIMAGE-JAIL
NETSTAT -NR DER VIMAGE-JAIL
/ETC/PF.CONF ON HOST
Leider kenne ich mich immer noch zu wenig mit IPv6 aus, um darauf zu kommen, was ich falsch mache...
Ich habe drei andere Jails auf die klassische Methode über das Loopback interface verbunden - dies werden per NAT/Redirect angebunden und sind (bei Bedarf) unter <ipv4_primär> und <ipv6_primär> wunderbar von außen erreichbar. Für die vierte benötige ich aber VIMAGE (für Redis). Diese Jail hat ihre eigenen öffentlichen Adressen (<ipv4_sekundär> und <ipv6_sekundär>).
IFCONFIG DES HOSTS
Code:
igb0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
ether 00:1e:67:f1:66:26
inet6 <ipv6_primär> prefixlen 64
inet6 fe80::21e:67ff:fef1:6626%igb0 prefixlen 64 scopeid 0x1
inet <ipv4_primär> netmask 0xffffffc0 broadcast <ipv4_primär_subnetz>
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
(... loopback interfaces)
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:67:50:95:1b:00
nd6 options=1<PERFORMNUD>
groups: bridge
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
member: vnet0:3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 6 priority 128 path cost 2000
member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 2000000
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33160
groups: pflog
vnet0:3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: associated with jail: 5129819c-c15c-4d7a-b1f4-23b8161ee450 (web2)
options=8<VLAN_MTU>
ether 02:ff:60:00:00:00
inet6 fe80::ff:60ff:fe00:0%vnet0:3 prefixlen 64 scopeid 0x6
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair
IFCONFIG DER VIMAGE-JAIL
Code:
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 0x1
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
pflog0: flags=0<> metric 0 mtu 33160
groups: pflog
vnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:ff:60:00:00:01
inet6 fe80::ff:60ff:fe00:1%vnet0 prefixlen 64 scopeid 0x3
inet6 <ipv6_sekundär> prefixlen 64
inet <ipv4_sekundär> netmask 0xffff0000 broadcast <ipv4_sekundär_subnetz>
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair
NETSTAT -NR DER VIMAGE-JAIL
Code:
Internet:
Destination Gateway Flags Netif Expire
default <ipv4_primär> UGS vnet0
127.0.0.1 link#1 UH lo0
<ipv4_primär>.0.0/16 link#3 U vnet0
<ipv4_sekundär> link#3 UHS lo0
Internet6:
Destination Gateway Flags Netif Expire
::/96 ::1 UGRS lo0
default fe80::1%vnet0 UGS vnet0
::1 link#1 UH lo0
::ffff:0.0.0.0/96 ::1 UGRS lo0
<ipv4_sekundär>::/64 link#3 U vnet0
<ipv4_sekundär>::2 02:ff:60:00:00:01 UHS vnet0
<ipv4_sekundär>::3 link#3 UHS lo0
fe80::/10 ::1 UGRS lo0
fe80::%lo0/64 link#1 U lo0
fe80::1%lo0 link#1 UHS lo0
fe80::%vnet0/64 link#3 U vnet0
fe80::ff:60ff:fe00:1%vnet0 link#3 UHS lo0
ff02::/16 ::1 UGRS lo0
/ETC/PF.CONF ON HOST
Code:
ext_if = "igb0"
# Adressen der "konventionellen" Jails
jails_ip4 = "{ 10.0.0.0/28 }"
jails_ip6 = "{ fd0c:800b:c17d:b1f0::0/116 }"
jail_services = "{ http, https, 8080 }"
icmp_types="{ 2, 128, 133, 134, 135, 136, 137 }"
# options
set block-policy return
set skip on { lo, bridge0 }
# scrub incoming packets
scrub in all
# NAT und RDR für "konventionelle" Jails
...
# setup a default deny policy
block log all
antispoof quick for $ext_if
# SSH
pass in quick on $ext_if proto tcp from any to (igb0) port xxx
# Traffic von den Jails
pass in quick on $ext_if proto { tcp udp icmp } from $jails_ip4 to any
pass in quick on $ext_if proto { tcp udp icmp6 } from $jails_ip6 to any
pass in quick on $ext_if proto { tcp udp icmp } from <ipv4_sekundär> to any
pass in quick on $ext_if proto { tcp udp icmp6 } from <ipv6_sekundär> to any
# Traffic to VNET-Jail
pass in quick on $ext_if proto tcp to <ipv4_sekundär> port $jail_services
pass in quick on $ext_if proto tcp to <ipv6_sekundär> port $jail_services
pass out on $ext_if proto { tcp udp icmp icmp6 } all
pass in inet proto icmp all icmp-type echoreq
# Zum TESTEN allen icmp6-Verkehr erlauben
pass in inet6 proto icmp6 all
pass out inet6 proto icmp6 all
Leider kenne ich mich immer noch zu wenig mit IPv6 aus, um darauf zu kommen, was ich falsch mache...