[Suche] Empfehlung für Router mit Kabel Deutschland unter openWRT

  • Firewall Itegration:

    1. Anlegen: die Zone vpn mit LuCI, kein Masquerading bei lan! Bild unten.

    2. Anlegen:

    /etc/config/firewall


    3. Anlegen:

    /etc/firewall.user


    4. Anlegen (. /etc/functions.sh gegen . /lib/functions.sh getauscht):

    /etc/ipsec/firewall.sh


    5. Das aufmerksam lesen:

    "Finally we have a look at the script. It injects all the additionally required settings according to /etc/config/ipsec into the OpenWrt firewall. Save it as /etc/ipsec/firewall.sh and put a calling line into /etc/firewall.user so it gets loaded automatically. REMARK: This script only enables VPN firewall rules that have been set in the LUCI web interface. There is no guarantee that manually implemented rules in /etc/config/firewall will work!"

    Albert

    Images

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • Ich habe (hoffe ich) alles so gemacht, wie du es beschrieben hast.

    strongswan.conf
    ipsec.conf
    ipsec statusall

    In /etc/firewall.user habe ich einen Aufruf der firewall.sh eingetragen (*nicht* firewall.ipsec, denn die gibt es nicht).
    Ein Aufruf von '/etc/init.d/firewall restart' ergibt aber Fehler:

    /etc/init.d/firewall restart


    [/code]
    Warning: Section @zone[0] (vpn) has no device, network, subnet or extra options
    * Flushing IPv4 filter table
    * Flushing IPv4 nat table
    * Flushing IPv4 mangle table
    * Flushing IPv4 raw table
    * Flushing IPv6 filter table
    * Flushing IPv6 mangle table
    * Flushing IPv6 raw table
    * Flushing conntrack table ...
    * Populating IPv4 filter table
    * Zone 'lan'
    * Zone 'wan'
    * Rule 'Allow-DHCP-Renew'
    * Rule 'Allow-Ping'
    * Rule 'Allow-IGMP'
    * Rule #7
    * Rule #8
    * Forward 'lan' -> 'wan'
    * Populating IPv4 nat table
    * Zone 'lan'
    * Zone 'wan'
    * Populating IPv4 mangle table
    * Zone 'lan'
    * Zone 'wan'
    * Populating IPv4 raw table
    * Zone 'lan'
    * Zone 'wan'
    * Populating IPv6 filter table
    * Zone 'lan'
    * Zone 'wan'
    * Rule 'Allow-DHCPv6'
    * Rule 'Allow-MLD'
    * Rule 'Allow-ICMPv6-Input'
    * Rule 'Allow-ICMPv6-Forward'
    * Rule #7
    * Rule #8
    * Forward 'lan' -> 'wan'
    * Populating IPv6 mangle table
    * Zone 'lan'
    * Zone 'wan'
    * Populating IPv6 raw table
    * Zone 'lan'
    * Zone 'wan'
    * Set tcp_ecn to off
    * Set tcp_syncookies to on
    * Set tcp_window_scaling to on
    * Running script '/etc/firewall.user'
    iptables: No chain/target/match by that name.
    ip6tables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    ip6tables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    iptables v1.4.21: Couldn't load target `zone_vpn_nat':No such file or directory

    Try `iptables -h' or 'iptables --help' for more information.
    iptables v1.4.21: Couldn't load target `zone_vpn_prerouting':No such file or directory

    Try `iptables -h' or 'iptables --help' for more information.
    iptables v1.4.21: Couldn't load target `zone_vpn_REJECT':No such file or directory

    Try `iptables -h' or 'iptables --help' for more information.
    iptables v1.4.21: Couldn't load target `zone_vpn_REJECT':No such file or directory

    Try `iptables -h' or 'iptables --help' for more information.
    iptables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    iptables v1.4.21: Couldn't load target `zone_vpn':No such file or directory

    Try `iptables -h' or 'iptables --help' for more information.
    iptables v1.4.21: Couldn't load target `zone_vpn_forward':No such file or directory

    Try `iptables -h' or 'iptables --help' for more information.
    iptables: No chain/target/match by that name.
    [/code]

    nobanzai: "left" und "right" sind per Konvention mit "local" bzw. "remote" assoziiert. "left" bzw. "local" ist dabei immer die Seite, auf der sich die jeweils betrachtete Datei befindet.

    Klaus

  • Er währt sich. Was sagt ipsec status? Geht was bei gestoppten Firewall durch, /etc/init.d/firewall stop?

    In basics sind vier Pakete als Mindestvoraussetzung genannt:

    - strongswan-default: everything needed for IPsec tunnels
    - ip: Required to make scripting easier
    - iptables-mod-nat-extra: For VPN networks with overlapping IP addresses
    - djbdns-tools: for simpler name resolving than nslookup

    sind alle installiert?

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • Code
    root@OpenWrt:~# ipsec status
    Security Associations (0 up, 0 connecting):
      none

    So wie es aussieht wird mit der jüngsten Variante der Tunnel gar nicht aufgebaut.

    Mit gestoppter Firewall geht gar nichts, nichtmal ein "ping heise.de".

    strongswan-default war nicht installiert, ip und iptables-mod-nat-extra schon.
    djbdns-tools gibt es anscheinend nicht, aber mit DNS hab ich ja keine Probleme.

    Ich habe strongswan-default installiert und zunächst mit meiner ursprünglichen Konfiguration probiert, ohne Erfolg. Der Tunnel wird zwar aufgebaut, aber es gehen keine Daten durch.

    Danach hab ich wieder mit deinen Scripts getestet, wobei ich die aber nicht nach /etc/init.d kopiert habe, um mir nicht gleich alles zu zerschießen ;-).
    Der Output war dieser hier:

    Leider alles ohne Erfolg...

    Klaus

  • Ist auch der Kernel Modul xt_recent Installiert (lsmod | grep xt_recent)?

    Wenn ja, dann werde ich wohl noch einmal alles durchgehen. Für mich gilt die Aussage von dem Autor:

    "The VPN concept I designed and wrote down in the wiki consists of four parts.
    1) Define a standard openwrt /etc/config file that takes informations about the VPN infrastructure. E.g. foreing endpoints tunneled networks, credentials and so on. You can see it just like the usual strongswan/racoon configuration but in the openwrt style.
    2) The part that is essential for the IKE damons is read out in the provided start scripts. These do nothing more than translating the new syntax into a daemon-specific standard syntax.
    3) The config part with the network definitions must be mergend into the openwrt firewall. So we can route the traffic. The additional firewall script takes care of this.
    4) with 1-3 in place we should have a working VPN solution but it will deny all traffic (to be safe and to emulate other firewalls). So we must add firewall rules between the newly created VPN zone and the existing zones manually in the web interface or the openwrt standard config files.
    To sum it up: I tried to create a fully integrated solution that might be a little harder to understand and implement. But if everything works the rest is just the usual firewall-rule-clicking.

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • Entferne die Zeile option 'zone' 'vpn' aus der /etc/config/ipsec. In dem Script wird sie doch namentlich genannt. Nur:

    Code
    #/etc/config/ipsec
    config 'ipsec'
      list listen ''


    Der Rest bleibt, auch wenn conn racoon-racoon_lan eleganter gestaltet werden könnte. ;)

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • In dem Script /etc/init.d/ipsec befindet sich die Zeile:

    echo " keyexchange=ikev1" >> $FileConn

    Ggf. sie auf ikev2 ändern, denn Du hast es schon erwähnt, dass die Tunnel nur mit ikev2 aufgebaut wird.

    Dann sollte in der ipsec.conf entsprechend keyexchange=ikev2 stehen.

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • Hallo,

    ich habe jetzt hier nicht alles durchgelesen, aber soweit verstanden das ein IPSEC Tunnel aufgebaut wird und kein Traffic durch den Tunnel geht.
    Hast du die Möglichkeit den Router bei einem anderen Provider zu testen, ich habe es soweit verstanden das es sich um Kabel Deutschland handelt.

    Hintergrund ist, dass ich gelesen habe das dieses Problem im Moment bei Unitymdia mit IPSEC und IOS als Client (>=9,x) auftritt.

    http://forum.golem.de/kommentare/app…80390,read.html


    https://forums.developer.apple.com/thread/16699

    Evtl. Iptables Lösung:
    http://www.ip-phone-forum.de/showthread.php?t=281439&page=11&p=2121611&viewfull=1#post2121611


    Das Problem scheint in den o.g. Fällen zwar UM und Apple spezifisch zu sein, aber wer weiss schon was die Netzbetreiber in Ihren Netzen so alles anstellen ;) .

    Gruss,
    Chuck

    1- yavdr 0.5 - DVB-C
    1- VDR-1.7.14 - Xine Pugin - XBMC - DVB-C
    2- Activy 300 mit Gen2VDR V2

  • Hi,

    vielleicht ist auch SoftEther auch mal einen Blick wert, ist Opensource GPL2 mit GUI fuer Server/Client und beherrscht SSL-VPN, OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3 und EtherIP. Damit müsste man alle Netzwerk Unwägbarkeiten meistern können.

    CU
    9000h

    Es ist eagl in wlehcer Reiehnfogle die Bchustebaen in Woeretrn vokrmomen. Huapstache der estre und leztte Bchustbae sitmmen.

  • Hab ich beides gemacht, aber es kommt kein Tunnel zustande.


    Probiere bitte mit dem ipsec.conf von hier die Tunnel hoch zu bekommen. Der letzte /etc/config/ipsec bleibt.

    Das xt_recent sollte für den firewall.sh relevant sein. Damit haben Leute die Fehlermeldungen beim Umsortieren wegbekommen. Kannst Du es mit laden!?

    Die erste Zeile ist Warnung aber ohne Belang. Sie hat sogar recht, die Zone vpn soll aber keinen Interface haben.

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • Das steckt in kmod-ipt-conntrack-extra.

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • Klaus, das Script aus basics lassen wir links liegen. Es ist nicht einmal alpha. Ob Charon loggt oder nicht, ist mir egal. Unter einer "clean integration into the OpenWrt" verstehe ich etwas anderes. Es ist einfach schlampig geschrieben. Die drei Dateien, die wir brauchen, die haben wir schon.

    Morgen versuche ich die /etc/config/ipsec passend zu der ipsec.conf zu gestalten. Hoffen wir mal, dass dann die /etc/ipsec/firewall.sh seine Arbeit verrichtet.

    Du schaust bitte wegen die kmod-ipt-conntrack-extra und dass der Tunnel steht (Posting 78, die strongswan.conf und ipsec.conf kurz vor Ende).

    Offensichtlich treten wir hier an einer Stelle, was bei OpenWRT kein Entwicklungsschwerpunkt zu sein scheint.

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

  • kmod-ipt-conntrack-extra habe ich jetzt installiert und xt_recent ist geladen.

    strongswan.conf und ipsec.conf sind wieder so wie in Posting 78, und der Tunnel steht:

    Daten gehen allerdings nach wie vor keine drüber.

    Klaus

  • Nachfolgend ein vollständiger Verbindungsaufbau (Log vom Server) zwischen einem Android Client mit Strongswan App und einer IPfire (Firewall). Eventuell hilft es weiter:

    Display Spoiler

    Externe IP: 82.122.101.43 (= dyn.dns.xxx)
    LAN-IP der Firewall: 192.168.101.3
    Subnetz für IPSec-VPN-Clients: 10.0.8.0/24
    kein PSK sondern Zertifikate!
    rw04 ist die Client-Config auf der IPfire
    IKEv2 mit charon

    ipsec statusall

    Display Spoiler


    Gruß
    iNOB

    Mein VDR

    Hartware: Gehäuse: Ahanix MCE 302, Mobo: Kontron 986LCD-M/mITX, CPU: Intel Core2 Duo Mobile T7400 2,16GHz, 2GB RAM, SAT: Digital Devices DuoFlex S2 miniPCIe, Graka: ASUS GeForce GT 1030 Silent, 2x4TB + 2x8TB 3,5" WD Red HD, 1x DVD-Brenner Pioneer, Atric IR-Einschalter+Empfänger, FB One-For-All URC-7960, SoundGraph iMON LCD ( MFP5I, 15c2:0038 )
    Weichware: Debian Stretch (x86_64), Kernel 4.15, NVidia v396.54, ffmpeg 3.4.4, VDR 2.4.0 gepatched

    Edited once, last by iNOB (November 5, 2015 at 11:20 AM).

  • Klaus, hier wird es langsam unübersichtlich, deshalb fasse ich es zusammen:

    /etc/init.d/ipsec
    /etc/config/ipsec
    /etc/config/firewall
    /etc/firewall.user
    /etc/ipsec/firewall.sh
    /etc/strongswan.conf
    /etc/ipsec.conf


    Bitte iptables -t nat -L | grep prerouting_ posten!

    Albert

    Signatur

    HD-VDR | yaVDR 0.5.0 | Cooltek AH-01 | Intel DH67BL | i3-2100 + Kozuti | 4GB | Zotac GT630 | 60GB SSD + 1TB 2,5" | L4M-Twin S2 6.2 | Harmony ONE+ CIR | Samsung UE40C6200
    SD-VDR | yaVDR 0.3.2 | MSI Hermes 845GV | P4 2,53 | 2GB | 250GB | TT Premium S-2300 RGB + TT-budget | SCR/Unicable | ausgeborgt
    HD-W10 | DVBViewer Pro | Bluechip MT tuned | Core i7 | 16GB | GTX 960 | 240GB SSD + 2TB | TT S2-3200 | X10

    Edited 10 times, last by ATD (November 8, 2015 at 10:51 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!