IPv6 Internettraffic durch OpenVPN-Tunnel

  • Hallo,
    ich versuche gerade druch einen OpenVPN-Tunnel IPv6-Internettraffic zu tunneln. IPv4 funktioniert bereits, ich kann mich mit dem VPN-Server verbinden, Traffic ins Internet geht ab sofort durch den Tunnel mit dem vServer als Endpunkt.
    Da der Server auch über IPv6 erreichbar ist, ist mein nächster Schritt es auch mit IPv6 zu versuchen. Dazu wollte ich den IP-Adressbereich des Servers zu nutzen. Danach sah meine Config so aus:
    mode server
    tls-server
    script-security 2
    persist-key
    persist-tun
    user openvpn
    group openvpn

    server 192.168.23.0 255.255.255.0
    push "route 192.168.23.0 255.255.255.0"
    push "route 0.0.0.0 0.0.0.0"
    push "dhcp-option DNS 192.168.23.1"
    push "redirect-gateway local def1"


    server-ipv6 2a03:4000:6:70a4:d00f::/65
    #push "route-ipv6 2a03:4000:6:70a4::1/64"
    push "route-ipv6 2000::/3"
    #push "redirect-gateway-ipv6 def1"
    #ifconfig-ipv6 2a03:4000:6:70a4::1 2a03:4000:6:70a4::2

    client-to-client
    link-mtu 1432
    auth sha512
    float
    dev tun
    tun-ipv6
    push tun-ipv6
    proto udp
    port 1194
    keepalive 10 300
    dh dh.pem
    ca ca.crt
    cert server.crt
    key server.key
    verb 4


    Die IP-Konfiguration des Servers sieht so aus:
    ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 37.120.174.231 netmask 255.255.252.0 broadcast 37.120.175.255
    inet6 fe80::5054:bcff:fee7:8438 prefixlen 64 scopeid 0x20<link>
    inet6 2a03:4000:6:70a4::1 prefixlen 64 scopeid 0x0<global>
    ether 52:54:bc:e7:84:38 txqueuelen 1000 (Ethernet)
    RX packets 20772899 bytes 3890853827 (3.6 GiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 38293549 bytes 55792310043 (51.9 GiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


    Ich bekomme eine IPv6-IP auf dem VPN-Interface, kann den Server anpingen, aber ich erreiche keine IPv6-Hosts im Internet.
    Wo ist mein Denkfehler?
    Auch mit aktiviertem net.ipv6.conf.all.forwarding = 1 komme ich nicht weiter, sowie mit ip6tables-Regeln:
    ip6tables -A FORWARD -i tun0 -o ens3 -j ACCEPT
    ip6tables -A FORWARD -i ens3 -o tun0 -j ACCEPT
    Hat da jemand eine Idee, wo es haken könnte?

  • Hast du es bereits wie bei IPv4 Probiert: Einen privatren Adressbereich innerhalb des VPN-Tunnels und dann auf dem Server ein NAT für Traffic in das Internet?
    Es sieht so aus, als ob du die global gerouteten Adressen innerhalb von OpenVPN nehmen willst...

  • Andreas: IPv6 kennt kein NAT! ;)


    Das ist ein normales Vorgehen, dass man bei IPv6 global gültige Adressen im VPN verwendet. Mache ich bei meinem Tunnel ebenfalls so.



    MfG Christian

    "Wer nur noch Enten sieht, hat die Kontrolle über seine Server verloren." (Netzentenfund)

  • Hallo,


    es läuft bei mir nicht mehr, da ich die Config nicht mehr brauche.
    Ja, es lief folgendermaßen mit OpenVPN:


    ich habe ein TAP-Device erstellen lassen und mittels "up" in der OpenVPN-Server+Clientconfig einfach das IPv6 hinzugefügt.


    Hier das Script für den Client:
    #!/bin/sh


    /sbin/ip -6 addr add fdab:2:1::2 dev $dev
    /sbin/ip -6 route add fdab:2:1::/48 dev $dev


    (Anmerkung: $dev wird von OpenVPN als Variable beim Aufruf des Scriptes gesetzt)
    Allerdings habe ich das System nur zum Testen der Firewall etc. für IPv6 getestet, da ich keinen IPv6 Internetanschluss zur Verfügung habe.

  • Ist das auch nen OpenVPN? Läuft es bei dir?


    Ja, ist ebenfalls OpenVPN und es läuft seit mehr als drei Jahren unter 4 Instanzen problemlos.


    Leider bin ich gerade etwas im Stress, deshalb kann ich Deine Konfiguration gerade nicht mit meiner vergleichen.



    MfG Christian

    "Wer nur noch Enten sieht, hat die Kontrolle über seine Server verloren." (Netzentenfund)

  • Hallo,


    ich habe das Problem jetzt mal etwas untersucht.
    Ich habe obige OpenVPN-Config für Server und Client aktiviert. Der Server und der Client können sich anpingen.
    Es ist bei mir aktuell möglich, dass ein Server im Internet algepingt wird. Dieser antwortet auch.
    Diese Antwort wird allerdings verworfen, das der Server mit VPN nicht folgende Anfragen beantwortet:


    (tcpdump auf Server mit VPN):
    11:41:38.022978 IP6 fe80::1 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2a03:***15::1000, length 32


    Somit erhält der angepingte Server eine Nachricht, dass der Pingende Client nicht erreichbar ist.


    (tcpdump auf angepingtem Server):
    11:41:37.745247 IP6 2a03:***15::1000 > n2.***.de: ICMP6, echo request, seq 39, length 64
    11:41:37.745303 IP6 n2.***.de > 2a03:***15::1000: ICMP6, echo reply, seq 39, length 64
    11:41:37.751064 IP6 2a03:4000:5::2 > n2.***.de: ICMP6, destination unreachable, unreachable address 2a03:***15::1000, length 112


    Dort hängt es bei mir Aktuell.
    Heute Nachmittag werde ich mal schauen, ob ich weiter komme.

  • Hallo,


    ich habe das Problem jetzt lösen können.


    Insgesammt müssen zwei Einträge im sysctl und ein weiterer je Client mit dem Befehl "ip" getätigt werden:


    sysctl net.ipv6.conf.all.forwarding=1
    sysctl net.ipv6.conf.all.proxy_ndp=1


    ip -6 neigh add proxy 2a03:***15:ffff::1000 dev eth0



    1. sysctl: IPv6 Packete dürfen weitergeleitet werden
    2. sysctl: Das Neighbor Discovery Protocol wird konfiguriert, so dass die VPN-Clients hinter dem Server als erreichbar erkannt werden (ähnlich wie bei IPv4 ein ARP-Response)
    3. Der Teil mit dem ip Befehl:


    Die Anfragen vom Client werden in das Internet gesendet. Für die Rückantwort lassen sich die IPv6-Router vom Server die Erreichbarkeit des Clients bestätigen.
    Dafür muss der Server so kofiguriert werden, so dass er auf Anfragen vom Internet aus bestätigt, dass er den Client erreichen kann. Erst dann können Antworten zurück geschickt werden.


    Der Befehl sagt also stumpf gesagt aus: "erzähle dem Internet (hier über eth0), dass der Client (hier 2a03:***15:ffff::1000) über mich erreichbar ist.
    ip -6 neigh add proxy 2a03:***15:ffff::1000 dev eth0



    Für das Setup bei mir habe ich von der Ursprünglichen geposteten Konfiguration folgende Änderungen gemacht:
    - Ich habe von tun auf tap-Interface umgestellt, damit diese eine Link-local Adresse haben
    - Ich habe das Netz von OpenVPN abgeändert. Es ist kleiner und der VPN-Server hat intern nicht mehr die Adresse 2a03:***15::1, sondern die 2a03:***15:ffff::1



    Funktioniert es, wenn die Änderungen auch übernommen wurden?


    Viele Grüße
    Andreas

  • Hmm, so richtig will es noch nicht...
    Im Prinzip fehlten mir noch die NDP-Einträge über sysctl und ip und das TAP-Interface.
    Der Server selbst hatte eine eine IP (2a03:4000:6:70a4:d00f::1) als das öffentliche Interface (2a03:4000:6:70a4::1).
    Die IP-Tables-Regeln habe ich noch an das TAP-Interface angepasst (falls sie überhaupt benötigt werden?)
    (ip6tables -t filter -A FORWARD -i ens3 -o tap0 -j ACCEPT und ip6tables -t filter -A FORWARD -i tap0 -o ens3 -j ACCEPT) Trotzdem wird der Traffic noch nicht weitergeleitet.


    Ach, als OS läuft bei mir Fedora 23.

  • Diese Befehle habe ich mir mitgeschrieben; sie alle brauchte ich, mehr nicht:


    sysctl net.ipv6.conf.default.forwarding=1
    sysctl net.ipv6.conf.all.forwarding=1
    sysctl net.ipv6.conf.all.proxy_ndp=1



    ip6tables -A FORWARD -i tap0 -j ACCEPT
    ip6tables -A FORWARD -o tap0 -j ACCEPT


    ip -6 neigh add proxy 2a03:***15:ffff::1000 dev eth0




    Was sagen denn die Tcp-Dumps auf den Interfacen tap0 und ens3, wenn jeweils ein Ping an den Server und ins Internet läuft?
    tcpdump -i tap0 icmp6
    tcpdump -i ens30 icmp6

  • Mit ping6 auf google.com von einem VPN-Client aus:


    tcpdump -i tap0 icmp6
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on tap0, link-type EN10MB (Ethernet), capture size 262144 bytes
    17:46:30.850508 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 16, length 64
    17:46:31.849496 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 17, length 64
    17:46:32.849944 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 18, length 64
    17:46:33.849644 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 19, length 64
    17:46:34.849367 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 20, length 64
    17:46:35.848815 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 21, length 64
    6 packets captured
    6 packets received by filter
    0 packets dropped by kernel


    tcpdump -i ens3 icmp6
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on ens3, link-type EN10MB (Ethernet), capture size 262144 bytes
    17:47:23.859551 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 69, length 64
    17:47:24.365155 IP6 fe80::f21c:2d00:6c7d:60c0 > ff02::1:ffd6:ca6: ICMP6, neighbor solicitation, who has 2a03:4000:6:7012:5054:24ff:fed6:ca6, length 32
    17:47:24.848137 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 70, length 64
    17:47:25.848584 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 71, length 64
    17:47:26.850453 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 72, length 64
    17:47:27.365456 IP6 fe80::f21c:2d00:6c7d:60c0 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2a03:4000:6:70a4:d00f::1000, length 32
    17:47:27.849903 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 73, length 64
    17:47:28.209988 IP6 gateway > ff02::1:ffd6:ca6: ICMP6, neighbor solicitation, who has 2a03:4000:6:7012:5054:24ff:fed6:ca6, length 32
    17:47:28.365051 IP6 fe80::f21c:2d00:6c7d:60c0 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2a03:4000:6:70a4:d00f::1000, length 32
    17:47:28.850009 IP6 2a03:4000:6:70a4:d00f::1000 > fra07s29-in-x02.1e100.net: ICMP6, echo request, seq 74, length 64
    17:47:29.364036 IP6 fe80::f21c:2d00:6c7d:60c0 > ff02::1:ffd6:ca6: ICMP6, neighbor solicitation, who has 2a03:4000:6:7012:5054:24ff:fed6:ca6, length 32
    17:47:29.365185 IP6 fe80::f21c:2d00:6c7d:60c0 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2a03:4000:6:70a4:d00f::1000, length 32


    12 packets captured
    21 packets received by filter
    0 packets dropped by kernel


    2a03:4000:6:70a4:d00f::1000 ist der VPN-Client
    2a03:4000:6:7012:5054:24ff:fed6:ca6, fe80::f21c:2d00:6c7d:60c0, ff02::1:ffd6:ca6 und ff02::1:ff00:1000 kann ich nicht zuordnen.
    fra07s29-in-x02.1e100.net ist google.com, müsste eigentlich auf 2a00:1450:4001:80b::1001 auflösen


    Für mich sieht es so aus, als würde keine Antwort von Google kommen?

  • Hier sehe ich bei dir das Fehlerbild das ich auch zuerst hatte. Bei mir sehe ich ein neighbour advertisement, bei deinem tcpdump, nicht.



    19:01:18.309044 IP6 fe80::f21c:2d00:767d:40c0 > ff02::1:ff6c:a999: ICMP6, neighbor solicitation, who has 2a03:***15:8491:8ff:fe6c:a999, length 32
    19:01:18.420773 IP6 fe80::1 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2a03:***15:ffff::1000, length 32
    19:01:18.549423 IP6 2a03:***15:ffff::1000 > muc03s14-in-x03.1e100.net: ICMP6, echo request, seq 2, length 64
    19:01:19.157813 IP6 fe80::8491:8ff:fe6c:a999 > fe80::1: ICMP6, neighbor advertisement, tgt is 2a03:***15:ffff::1000, length 32
    19:01:19.420061 IP6 fe80::1 > ff02::1:ff6c:a999: ICMP6, neighbor solicitation, who has 2a03:***15:8491:8ff:fe6c:a999, length 32
    19:01:19.550465 IP6 2a03:***15:ffff::1000 > muc03s14-in-x03.1e100.net: ICMP6, echo request, seq 3, length 64
    19:01:19.560550 IP6 muc03s14-in-x03.1e100.net > 2a03:***15:ffff::1000: ICMP6, echo reply, seq 3, length 64


    Warum diese nicht zu sehen sind weiß ich nicht, hier jedenfalls mal die sysctl von mir direkt nach dem ping6-test. Gibt es Unterschiede?


    $ sysctl -a | grep ipv6
    net.ipv6.anycast_src_echo_reply = 0
    net.ipv6.bindv6only = 0
    net.ipv6.conf.all.accept_dad = 1
    net.ipv6.conf.all.accept_ra = 1
    net.ipv6.conf.all.accept_ra_defrtr = 1
    net.ipv6.conf.all.accept_ra_pinfo = 1
    net.ipv6.conf.all.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.all.accept_ra_rtr_pref = 1
    net.ipv6.conf.all.accept_redirects = 1
    net.ipv6.conf.all.accept_source_route = 0
    net.ipv6.conf.all.autoconf = 1
    net.ipv6.conf.all.dad_transmits = 1
    net.ipv6.conf.all.disable_ipv6 = 0
    net.ipv6.conf.all.force_mld_version = 0
    net.ipv6.conf.all.force_tllao = 0
    net.ipv6.conf.all.forwarding = 1
    net.ipv6.conf.all.hop_limit = 64
    net.ipv6.conf.all.max_addresses = 16
    net.ipv6.conf.all.max_desync_factor = 600
    net.ipv6.conf.all.mc_forwarding = 0
    net.ipv6.conf.all.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.all.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.all.mtu = 1280
    net.ipv6.conf.all.ndisc_notify = 0
    net.ipv6.conf.all.optimistic_dad = 0
    net.ipv6.conf.all.proxy_ndp = 1
    net.ipv6.conf.all.regen_max_retry = 3
    net.ipv6.conf.all.router_probe_interval = 60
    net.ipv6.conf.all.router_solicitation_delay = 1
    net.ipv6.conf.all.router_solicitation_interval = 4
    net.ipv6.conf.all.router_solicitations = 3
    net.ipv6.conf.all.suppress_frag_ndisc = 1
    net.ipv6.conf.all.temp_prefered_lft = 86400
    net.ipv6.conf.all.temp_valid_lft = 604800
    net.ipv6.conf.all.use_tempaddr = 0
    net.ipv6.conf.default.accept_dad = 1
    net.ipv6.conf.default.accept_ra = 1
    net.ipv6.conf.default.accept_ra_defrtr = 1
    net.ipv6.conf.default.accept_ra_pinfo = 1
    net.ipv6.conf.default.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.default.accept_ra_rtr_pref = 1
    net.ipv6.conf.default.accept_redirects = 1
    net.ipv6.conf.default.accept_source_route = 0
    net.ipv6.conf.default.autoconf = 1
    net.ipv6.conf.default.dad_transmits = 1
    net.ipv6.conf.default.disable_ipv6 = 0
    net.ipv6.conf.default.force_mld_version = 0
    net.ipv6.conf.default.force_tllao = 0
    net.ipv6.conf.default.forwarding = 1
    net.ipv6.conf.default.hop_limit = 64
    net.ipv6.conf.default.max_addresses = 16
    net.ipv6.conf.default.max_desync_factor = 600
    net.ipv6.conf.default.mc_forwarding = 0
    net.ipv6.conf.default.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.default.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.default.mtu = 1280
    net.ipv6.conf.default.ndisc_notify = 0
    net.ipv6.conf.default.optimistic_dad = 0
    net.ipv6.conf.default.proxy_ndp = 0
    net.ipv6.conf.default.regen_max_retry = 3
    net.ipv6.conf.default.router_probe_interval = 60
    net.ipv6.conf.default.router_solicitation_delay = 1
    net.ipv6.conf.default.router_solicitation_interval = 4
    net.ipv6.conf.default.router_solicitations = 3
    net.ipv6.conf.default.suppress_frag_ndisc = 1
    net.ipv6.conf.default.temp_prefered_lft = 86400
    net.ipv6.conf.default.temp_valid_lft = 604800
    net.ipv6.conf.default.use_tempaddr = 0
    net.ipv6.conf.eth0.accept_dad = 1
    net.ipv6.conf.eth0.accept_ra = 0
    net.ipv6.conf.eth0.accept_ra_defrtr = 1
    net.ipv6.conf.eth0.accept_ra_pinfo = 1
    net.ipv6.conf.eth0.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.eth0.accept_ra_rtr_pref = 1
    net.ipv6.conf.eth0.accept_redirects = 1
    net.ipv6.conf.eth0.accept_source_route = 0
    net.ipv6.conf.eth0.autoconf = 0
    net.ipv6.conf.eth0.dad_transmits = 1
    net.ipv6.conf.eth0.disable_ipv6 = 0
    net.ipv6.conf.eth0.force_mld_version = 0
    net.ipv6.conf.eth0.force_tllao = 0
    net.ipv6.conf.eth0.forwarding = 1
    net.ipv6.conf.eth0.hop_limit = 64
    net.ipv6.conf.eth0.max_addresses = 16
    net.ipv6.conf.eth0.max_desync_factor = 600
    net.ipv6.conf.eth0.mc_forwarding = 0
    net.ipv6.conf.eth0.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.eth0.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.eth0.mtu = 1500
    net.ipv6.conf.eth0.ndisc_notify = 0
    net.ipv6.conf.eth0.optimistic_dad = 0
    net.ipv6.conf.eth0.proxy_ndp = 0
    net.ipv6.conf.eth0.regen_max_retry = 3
    net.ipv6.conf.eth0.router_probe_interval = 60
    net.ipv6.conf.eth0.router_solicitation_delay = 1
    net.ipv6.conf.eth0.router_solicitation_interval = 4
    net.ipv6.conf.eth0.router_solicitations = 3
    net.ipv6.conf.eth0.suppress_frag_ndisc = 1
    net.ipv6.conf.eth0.temp_prefered_lft = 86400
    net.ipv6.conf.eth0.temp_valid_lft = 604800
    net.ipv6.conf.eth0.use_tempaddr = 0


    net.ipv6.conf.tap0.accept_dad = 1
    net.ipv6.conf.tap0.accept_ra = 1
    net.ipv6.conf.tap0.accept_ra_defrtr = 1
    net.ipv6.conf.tap0.accept_ra_pinfo = 1
    net.ipv6.conf.tap0.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.tap0.accept_ra_rtr_pref = 1
    net.ipv6.conf.tap0.accept_redirects = 1
    net.ipv6.conf.tap0.accept_source_route = 0
    net.ipv6.conf.tap0.autoconf = 1
    net.ipv6.conf.tap0.dad_transmits = 1
    net.ipv6.conf.tap0.disable_ipv6 = 0
    net.ipv6.conf.tap0.force_mld_version = 0
    net.ipv6.conf.tap0.force_tllao = 0
    net.ipv6.conf.tap0.forwarding = 1
    net.ipv6.conf.tap0.hop_limit = 64
    net.ipv6.conf.tap0.max_addresses = 16
    net.ipv6.conf.tap0.max_desync_factor = 600
    net.ipv6.conf.tap0.mc_forwarding = 0
    net.ipv6.conf.tap0.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.tap0.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.tap0.mtu = 1500
    net.ipv6.conf.tap0.ndisc_notify = 0
    net.ipv6.conf.tap0.optimistic_dad = 0
    net.ipv6.conf.tap0.proxy_ndp = 0
    net.ipv6.conf.tap0.regen_max_retry = 3
    net.ipv6.conf.tap0.router_probe_interval = 60
    net.ipv6.conf.tap0.router_solicitation_delay = 1
    net.ipv6.conf.tap0.router_solicitation_interval = 4
    net.ipv6.conf.tap0.router_solicitations = 3
    net.ipv6.conf.tap0.suppress_frag_ndisc = 1
    net.ipv6.conf.tap0.temp_prefered_lft = 86400
    net.ipv6.conf.tap0.temp_valid_lft = 604800
    net.ipv6.conf.tap0.use_tempaddr = 0
    net.ipv6.flowlabel_consistency = 1
    net.ipv6.fwmark_reflect = 0
    net.ipv6.icmp.ratelimit = 1000
    net.ipv6.ip6frag_high_thresh = 4194304
    net.ipv6.ip6frag_low_thresh = 3145728
    net.ipv6.ip6frag_secret_interval = 600
    net.ipv6.ip6frag_time = 60
    net.ipv6.mld_max_msf = 64


    net.ipv6.neigh.eth0.anycast_delay = 100
    net.ipv6.neigh.eth0.app_solicit = 0
    net.ipv6.neigh.eth0.base_reachable_time_ms = 30000
    net.ipv6.neigh.eth0.delay_first_probe_time = 5
    net.ipv6.neigh.eth0.gc_stale_time = 60
    net.ipv6.neigh.eth0.locktime = 0
    net.ipv6.neigh.eth0.mcast_solicit = 3
    net.ipv6.neigh.eth0.proxy_delay = 80
    net.ipv6.neigh.eth0.proxy_qlen = 64
    net.ipv6.neigh.eth0.retrans_time_ms = 1000
    net.ipv6.neigh.eth0.ucast_solicit = 3
    net.ipv6.neigh.eth0.unres_qlen = 31
    net.ipv6.neigh.eth0.unres_qlen_bytes = 65536


    net.ipv6.neigh.tap0.anycast_delay = 100
    net.ipv6.neigh.tap0.app_solicit = 0
    net.ipv6.neigh.tap0.base_reachable_time_ms = 30000
    net.ipv6.neigh.tap0.delay_first_probe_time = 5
    net.ipv6.neigh.tap0.gc_stale_time = 60
    net.ipv6.neigh.tap0.locktime = 0
    net.ipv6.neigh.tap0.mcast_solicit = 3
    net.ipv6.neigh.tap0.proxy_delay = 80
    net.ipv6.neigh.tap0.proxy_qlen = 64
    net.ipv6.neigh.tap0.retrans_time_ms = 1000
    net.ipv6.neigh.tap0.ucast_solicit = 3
    net.ipv6.neigh.tap0.unres_qlen = 31
    net.ipv6.neigh.tap0.unres_qlen_bytes = 65536
    net.ipv6.route.gc_elasticity = 9
    net.ipv6.route.gc_interval = 30
    net.ipv6.route.gc_min_interval = 0
    net.ipv6.route.gc_min_interval_ms = 500
    net.ipv6.route.gc_thresh = 1024
    net.ipv6.route.gc_timeout = 60
    net.ipv6.route.max_size = 4096
    net.ipv6.route.min_adv_mss = 1220
    net.ipv6.route.mtu_expires = 600
    net.ipv6.xfrm6_gc_thresh = 32768

  • Bei mir sieht es so aus:
    Die unterstrichenen Einträge hatte ich aufs Gegenteil geändert, ohne Erfolg:


    net.ipv6.anycast_src_echo_reply = 0
    net.ipv6.auto_flowlabels = 0
    net.ipv6.bindv6only = 0
    net.ipv6.conf.all.accept_dad = 1
    net.ipv6.conf.all.accept_ra = 0
    net.ipv6.conf.all.accept_ra_defrtr = 1
    sysctl: net.ipv6.conf.all.accept_ra_from_local = 0
    net.ipv6.conf.all.accept_ra_mtu = 1
    net.ipv6.conf.all.accept_ra_pinfo = 1
    net.ipv6.conf.all.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.all.accept_ra_rtr_pref = 1
    net.ipv6.conf.all.accept_redirects = 0
    net.ipv6.conf.all.accept_source_route = 0
    net.ipv6.conf.all.autoconf = 1
    net.ipv6.conf.all.dad_transmits = 1
    net.ipv6.conf.all.disable_ipv6 = 0
    net.ipv6.conf.all.force_mld_version = 0
    net.ipv6.conf.all.force_tllao = 0
    net.ipv6.conf.all.forwarding = 1
    net.ipv6.conf.all.hop_limit = 64
    net.ipv6.conf.all.max_addresses = 16
    net.ipv6.conf.all.max_desync_factor = 600
    net.ipv6.conf.all.mc_forwarding = 0
    net.ipv6.conf.all.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.all.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.all.mtu = 1280
    net.ipv6.conf.all.ndisc_notify = 0
    net.ipv6.conf.all.optimistic_dad = 0
    net.ipv6.conf.all.proxy_ndp = 1
    net.ipv6.conf.all.regen_max_retry = 3
    net.ipv6.conf.all.router_probe_interval = 60
    net.ipv6.conf.all.router_solicitation_delay = 1
    net.ipv6.conf.all.router_solicitation_interval = 4
    net.ipv6.conf.all.router_solicitations = 3
    sysctl: net.ipv6.conf.all.suppress_frag_ndisc = 1
    net.ipv6.conf.all.temp_prefered_lft = 86400
    net.ipv6.conf.all.temp_valid_lft = 604800
    net.ipv6.conf.all.use_optimistic = 0
    net.ipv6.conf.all.use_tempaddr = 0
    net.ipv6.conf.default.accept_dad = 1
    net.ipv6.conf.default.accept_ra = 0
    net.ipv6.conf.default.accept_ra_defrtr = 1
    net.ipv6.conf.default.accept_ra_from_local = 0
    net.ipv6.conf.default.accept_ra_mtu = 1
    net.ipv6.conf.default.accept_ra_pinfo = 1
    net.ipv6.conf.default.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.default.accept_ra_rtr_pref = 1
    net.ipv6.conf.default.accept_redirects = 0
    net.ipv6.conf.default.accept_source_route = 0
    net.ipv6.conf.default.autoconf = 1
    net.ipv6.conf.default.dad_transmits = 1
    net.ipv6.conf.default.disable_ipv6 = 0
    net.ipv6.conf.default.force_mld_version = 0
    net.ipv6.conf.default.force_tllao = 0
    net.ipv6.conf.default.forwarding = 1
    net.ipv6.conf.default.hop_limit = 64
    net.ipv6.conf.default.max_addresses = 16
    net.ipv6.conf.default.max_desync_factor = 600
    net.ipv6.conf.default.mc_forwarding = 0
    net.ipv6.conf.default.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.default.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.default.mtu = 1280
    net.ipv6.conf.default.ndisc_notify = 0
    net.ipv6.conf.default.optimistic_dad = 0
    net.ipv6.conf.default.proxy_ndp = 0
    net.ipv6.conf.default.regen_max_retry = 3
    net.ipv6.conf.default.router_probe_interval = 60
    net.ipv6.conf.default.router_solicitation_delay = 1
    net.ipv6.conf.default.router_solicitation_interval = 4
    net.ipv6.conf.default.router_solicitations = 3
    reading key "net.ipv6.conf.default.stable_secret"
    net.ipv6.conf.default.suppress_frag_ndisc = 1
    net.ipv6.conf.default.temp_prefered_lft = 86400
    net.ipv6.conf.default.temp_valid_lft = 604800
    net.ipv6.conf.default.use_optimistic = 0
    net.ipv6.conf.default.use_tempaddr = 0


    net.ipv6.conf.ens3.accept_dad = 1
    sysctl: reading key "net.ipv6.conf.ens3.stable_secret"
    net.ipv6.conf.ens3.accept_ra = 0
    net.ipv6.conf.ens3.accept_ra_defrtr = 1
    net.ipv6.conf.ens3.accept_ra_from_local = 0
    net.ipv6.conf.ens3.accept_ra_mtu = 1
    net.ipv6.conf.ens3.accept_ra_pinfo = 1
    net.ipv6.conf.ens3.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.ens3.accept_ra_rtr_pref = 1
    net.ipv6.conf.ens3.accept_redirects = 0
    net.ipv6.conf.ens3.accept_source_route = 0
    net.ipv6.conf.ens3.autoconf = 0
    net.ipv6.conf.ens3.dad_transmits = 1
    net.ipv6.conf.ens3.disable_ipv6 = 0
    net.ipv6.conf.ens3.force_mld_version = 0
    net.ipv6.conf.ens3.force_tllao = 0
    net.ipv6.conf.ens3.forwarding = 1
    net.ipv6.conf.ens3.hop_limit = 64
    net.ipv6.conf.ens3.max_addresses = 16
    net.ipv6.conf.ens3.max_desync_factor = 600
    net.ipv6.conf.ens3.mc_forwarding = 0
    net.ipv6.conf.ens3.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.ens3.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.ens3.mtu = 1500
    net.ipv6.conf.ens3.ndisc_notify = 0
    net.ipv6.conf.ens3.optimistic_dad = 0
    net.ipv6.conf.ens3.proxy_ndp = 0
    net.ipv6.conf.ens3.regen_max_retry = 3
    net.ipv6.conf.ens3.router_probe_interval = 60
    net.ipv6.conf.ens3.router_solicitation_delay = 1
    net.ipv6.conf.ens3.router_solicitation_interval = 4
    net.ipv6.conf.ens3.router_solicitations = 3
    sysctl: reading key "net.ipv6.conf.lo.stable_secret"
    net.ipv6.conf.ens3.suppress_frag_ndisc = 1
    net.ipv6.conf.ens3.temp_prefered_lft = 86400
    net.ipv6.conf.ens3.temp_valid_lft = 604800
    net.ipv6.conf.ens3.use_optimistic = 0
    net.ipv6.conf.ens3.use_tempaddr = 0


    net.ipv6.conf.tap0.accept_dad = 1
    net.ipv6.conf.tap0.accept_ra = 0
    net.ipv6.conf.tap0.accept_ra_defrtr = 1
    net.ipv6.conf.tap0.accept_ra_from_local = 0
    net.ipv6.conf.tap0.accept_ra_mtu = 1
    net.ipv6.conf.tap0.accept_ra_pinfo = 1
    net.ipv6.conf.tap0.accept_ra_rt_info_max_plen = 0
    net.ipv6.conf.tap0.accept_ra_rtr_pref = 1
    net.ipv6.conf.tap0.accept_redirects = 0
    net.ipv6.conf.tap0.accept_source_route = 0
    net.ipv6.conf.tap0.autoconf = 1
    net.ipv6.conf.tap0.dad_transmits = 1
    net.ipv6.conf.tap0.disable_ipv6 = 0
    net.ipv6.conf.tap0.force_mld_version = 0
    net.ipv6.conf.tap0.force_tllao = 0
    net.ipv6.conf.tap0.forwarding = 1
    net.ipv6.conf.tap0.hop_limit = 64
    net.ipv6.conf.tap0.max_addresses = 16
    net.ipv6.conf.tap0.max_desync_factor = 600
    net.ipv6.conf.tap0.mc_forwarding = 0
    net.ipv6.conf.tap0.mldv1_unsolicited_report_interval = 10000
    net.ipv6.conf.tap0.mldv2_unsolicited_report_interval = 1000
    net.ipv6.conf.tap0.mtu = 1315
    net.ipv6.conf.tap0.ndisc_notify = 0
    net.ipv6.conf.tap0.optimistic_dad = 0
    net.ipv6.conf.tap0.proxy_ndp = 0
    net.ipv6.conf.tap0.regen_max_retry = 3
    net.ipv6.conf.tap0.router_probe_interval = 60
    net.ipv6.conf.tap0.router_solicitation_delay = 1
    net.ipv6.conf.tap0.router_solicitation_interval = 4
    net.ipv6.conf.tap0.router_solicitations = 3
    net.ipv6.conf.tap0.suppress_frag_ndisc = 1
    net.ipv6.conf.tap0.temp_prefered_lft = 86400
    net.ipv6.conf.tap0.temp_valid_lft = 604800
    net.ipv6.conf.tap0.use_optimistic = 0
    net.ipv6.conf.tap0.use_tempaddr = 0


    net.ipv6.flowlabel_consistency = 1
    net.ipv6.flowlabel_state_ranges = 1
    net.ipv6.fwmark_reflect = 0
    net.ipv6.icmp.ratelimit = 1000
    net.ipv6.idgen_delay = 1
    net.ipv6.idgen_retries = 3
    net.ipv6.ip6frag_high_thresh = 4194304
    net.ipv6.ip6frag_low_thresh = 3145728
    net.ipv6.ip6frag_secret_interval = 0
    net.ipv6.ip6frag_time = 60
    net.ipv6.mld_max_msf = 64
    net.ipv6.mld_qrv = 2
    net.ipv6.neigh.default.anycast_delay = 100
    net.ipv6.neigh.default.app_solicit = 0
    net.ipv6.neigh.default.base_reachable_time_ms = 30000
    net.ipv6.neigh.default.delay_first_probe_time = 5
    net.ipv6.neigh.default.gc_interval = 30
    net.ipv6.neigh.default.gc_stale_time = 60
    net.ipv6.neigh.default.gc_thresh1 = 128
    net.ipv6.neigh.default.gc_thresh2 = 512
    net.ipv6.neigh.default.gc_thresh3 = 1024
    net.ipv6.neigh.default.locktime = 0
    net.ipv6.neigh.default.mcast_resolicit = 0
    net.ipv6.neigh.default.mcast_solicit = 3
    net.ipv6.neigh.default.proxy_delay = 80
    net.ipv6.neigh.default.proxy_qlen = 64
    net.ipv6.neigh.default.retrans_time_ms = 1000
    net.ipv6.neigh.default.ucast_solicit = 3
    net.ipv6.neigh.default.unres_qlen = 31
    net.ipv6.neigh.default.unres_qlen_bytes = 65536
    net.ipv6.neigh.ens3.anycast_delay = 100
    net.ipv6.neigh.ens3.app_solicit = 0
    net.ipv6.neigh.ens3.base_reachable_time_ms = 30000
    net.ipv6.neigh.ens3.delay_first_probe_time = 5
    net.ipv6.neigh.ens3.gc_stale_time = 60
    net.ipv6.neigh.ens3.locktime = 0
    net.ipv6.neigh.ens3.mcast_resolicit = 0
    net.ipv6.neigh.ens3.mcast_solicit = 3
    net.ipv6.neigh.ens3.proxy_delay = 80
    net.ipv6.neigh.ens3.proxy_qlen = 64
    net.ipv6.neigh.ens3.retrans_time_ms = 1000
    net.ipv6.neigh.ens3.ucast_solicit = 3
    net.ipv6.neigh.ens3.unres_qlen = 31
    net.ipv6.neigh.ens3.unres_qlen_bytes = 65536


    net.ipv6.neigh.tap0.anycast_delay = 100
    net.ipv6.neigh.tap0.app_solicit = 0
    net.ipv6.neigh.tap0.base_reachable_time_ms = 30000
    net.ipv6.neigh.tap0.delay_first_probe_time = 5
    net.ipv6.neigh.tap0.gc_stale_time = 60
    net.ipv6.neigh.tap0.locktime = 0
    net.ipv6.neigh.tap0.mcast_resolicit = 0
    net.ipv6.neigh.tap0.mcast_solicit = 3
    net.ipv6.neigh.tap0.proxy_delay = 80
    net.ipv6.neigh.tap0.proxy_qlen = 64
    net.ipv6.neigh.tap0.retrans_time_ms = 1000
    net.ipv6.neigh.tap0.ucast_solicit = 3
    net.ipv6.neigh.tap0.unres_qlen = 31
    net.ipv6.neigh.tap0.unres_qlen_bytes = 65536
    net.ipv6.route.gc_elasticity = 9
    net.ipv6.route.gc_interval = 30
    net.ipv6.route.gc_min_interval = 0
    net.ipv6.route.gc_min_interval_ms = 500
    net.ipv6.route.gc_thresh = 1024
    net.ipv6.route.gc_timeout = 60
    net.ipv6.route.max_size = 4096
    net.ipv6.route.min_adv_mss = 1220
    net.ipv6.route.mtu_expires = 600
    net.ipv6.xfrm6_gc_thresh = 32768


    Ich habe auch keinen anderen Wert gesehen, der mir spontan ins Auge springen würde, der mit NDP zu tun hat und relevant sein könnte.

  • Interessant - nach einem Reboot des Servers habe ich die Werte

    Code
    sysctl net.ipv6.conf.all.proxy_ndp=1
    ip -6 neigh add proxy 2a03:4000:6:70a4:d00f::1000 dev ens3


    neu gesetzt, (net.ipv6.conf.default.forwarding und net.ipv6.conf.all.forwarding waren schon aktiviert), und danach gingen Pings raus.
    Allerdings scheinen alle anderen Anwendungen IPv6 über den Tunnel zu ignorieren bzw bekommen ein "Permission denied"

    Zitat

    wget -6 google.com
    --2015-12-06 09:46:31-- http://google.com/
    Resolving google.com (google.com)... 2a00:1450:4001:802::1008
    Connecting to google.com (google.com)|2a00:1450:4001:802::1008|:80... failed: Permission denied.
    Retrying.

    :O

  • Scheinbar waren einige Werte bei sysctl verdreht, wenn es jetzt nach einem reboot geht.
    Wenn der PING funktioniert ist auf Verbindungsebene alles funktionstüchtig. Generell sollte auch HTTP funktionieren.
    Einige Gründe, dass es dennoch nicht funktioniert könnten Firewalls oder Dinge wie SELinux sein.


    Siehst du im TCPDump eine Meldung, dieauf das Zurückweisen der Verbindung hindeutet (etwa ein ICMP Reject)?

  • Das Problem sind meine ip6tables-Regeln. Über Regeln wie
    "ip6tables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT" etc öffne ich die Ports die ich brauche nach außen.
    Alles andere wird gedroppt mit "ip6tables -P INPUT DROP".
    Mit "ip6tables -P INPUT ACCEPT" funktioniert es.
    "ip6tables -A INPUT -i ens3 -o tun0 -j ACCEPT" quittiert er mit "Can't use -o with INPUT". Vermutlich ist die Lösung sehr naheliegend, im Moment habe ich nur ein Brett vor dem Kopf. ;)

  • Vermutlich musst du nur die RELATED und ESTABLISHED Regel im INPUT hizuhügen.


    Hier die Regeln von meinem Server:


    $ ip6tables-save
    # Generated by ip6tables-save v1.4.21 on Sun Dec 6 13:39:33 2015
    *filter
    :INPUT DROP [0:0]
    :FORWARD DROP [12:864]
    :OUTPUT DROP [0:0]
    -A INPUT -s ::1/128 -d ::1/128 -j ACCEPT
    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m multiport --dports 80,443 -m state --state NEW -m limit --limit 10/sec -j ACCEPT
    -A INPUT -p ipv6-icmp -j ACCEPT
    -A FORWARD -i tap0 -j ACCEPT
    -A FORWARD -o tap0 -j ACCEPT
    -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
    -A OUTPUT -p ipv6-icmp -j ACCEPT
    COMMIT
    # Completed on Sun Dec 6 13:39:33 2015

  • Hmmm, die Regel scheint nichts zu verändern.
    Bei mir sieht es so aus:
    # Generated by ip6tables-save v1.4.21 on Sun Dec 6 13:52:27 2015
    *filter
    :INPUT DROP [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
    -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
    -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -m limit --limit 50/min --limit-burst 200 -j ACCEPT
    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
    [weitere Portfreigaben]
    -A FORWARD -i tun0 -o ens3 -j ACCEPT
    -A FORWARD -i ens3 -o tun0 -j ACCEPT


    COMMIT
    # Completed on Sun Dec 6 13:52:27 2015

  • Wo hast du denn diese beiden Kandidaten her? Aus interesse: was sollen sie bewirken?


    -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
    -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP


    Dies sind die einzigen beiden Regeln, die Verdächtig aussehen, finde ich. Funktioniert es ohne sie?