1. Startseite
  2. Artikel
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Forum
  5. Digital Signage Info
  6. Glasfaserinternetanbieter bewerten
  7. Blog
    1. Artikel
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Forum
  • Blog-Artikel
  • Erweiterte Suche
  1. Glasfaserforum.de - Das Informations- und Hilfeforum rund um das Glasfaser-Internet.
  2. Forum
  3. Alles über das Glasfaser-Internet
  4. Glasfaser-Technik: Modem, Router, Netzwerk & Verkabelung

DeutscheGlasfaser / OpenWRT Router / Portfreigabe eines Servers mit Podman Containern

  • fcc123
  • 17. Oktober 2023 um 20:29
  • fcc123
    Beiträge
    20
    • 17. Oktober 2023 um 20:29
    • #1

    Gerne poste ich die funktionierende Config aus meinen Hilfethread.

    Hier meine funktionierende Konfiguration mit Openwrt 22.03.5 (Archer C7 v5) / Server (Debian & podman):

    OpenWRT:

    /etc/config/network:

    Code
    config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
    
    config globals 'globals'
        option ula_prefix 'fd86:3ad6:232c::/48'
    
    config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'
    
    config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
    
    config device
        option name 'eth0.2'
    
    config interface 'wan'
        option device 'eth0.2'
        option proto 'dhcp'
    
    config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'
    
    config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'
    
    config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '0t 3 4 5'
        option description 'LAN'
    
    config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 1'
        option vid '2'
        option description 'WAN'
    
    config device
        option name 'eth0'
        option macaddr 'xx:xx:xx:xx:xx:xx'
    
    config device
        option name 'eth0.1'
        option type '8021q'
        option ifname 'eth0'
        option vid '1'
        option macaddr 'xx:xx:xx:xx:xx:xx'
    Alles anzeigen

    /etc/config/firewall:

    Code
    config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'
    
    config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'
    
    config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
    
    config forwarding
        option src 'lan'
        option dest 'wan'
    
    config rule
        option family 'ipv6'
        option src 'wan'
        option dest 'lan'
        option target 'ACCEPT'
        option name 'srv'
        list proto 'tcp'
        list proto 'udp'
        list dest_ip '::xxx/-64'
        option dest_port '22 25 80 110 143 443 465 587 993 995 51820'
    
    config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'
    
    config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'
    
    config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'
    Alles anzeigen

    /etc/config/dhcp:

    Code
    config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
    
    config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        list dhcp_option '6,192.168.1.2'
        option ra_mininterval '200'
    
    config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
    
    config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'
    Alles anzeigen

    Der Knackpunkt bei meinem Scenario war die Config von podman da man die podman Netzwerke ipV6-fähig machen muss. Dazu am besten der Anleitung hier folgen: Podman Networking ipV6

    Aardvark DNS habe ich auch installiert und dann sieht meine Netzwerk-Config so aus:

    Code
    {
         "name": "default_network",
         "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
         "driver": "bridge",
         "network_interface": "podman2",
         "created": "2023-10-08T20:23:34.192362397+02:00",
         "subnets": [
              {
                   "subnet": "fd00::1:10:0/112",
                   "gateway": "fd00::1:10:1"
              },
              {
                   "subnet": "10.11.12.0/16",
                   "gateway": "10.11.12.1"
              }
         ],
         "ipv6_enabled": true,
         "internal": false,
         "dns_enabled": true,
         "ipam_options": {
              "driver": "host-local"
         }
    }
    Alles anzeigen

    Damit waren meine podman Dienste via OpenWrt freigegeben.

    Ich muss anfügen, dass der Archer C7 einfach zu langsam ist für die Glasfaserleitung. Ich habe max. 250mbit down hinbekommen. Als Freifunk Node ist er aber ausreichend.

    Deshalb läuft bei mir seit eben wieder eine Fritzbox (4060). Eigentlich wollte ich keine Fritzbox mehr, es war aber vom Preis her einigermaßen interessant da ich die alten Fritzfon-Teile noch weiter verwenden kann.

    Wichtig: DNS-Rebind Schutz muss bei der Fritzbox ggf. konfiguriert werden. Bei mir gabs da Probleme bei dem Kontakt zum Server aus dem lokalen Netzwerk.

    Des weiteren habe ich den Mailserver auf einen VPS in die Cloud umgezogen. Ein Mailserver via ipV6 ist noch nicht überall gerne gesehen ;)

    Und so sieht die Bastelecke in natura aus:

    Das Ding da unten ist übrigens nicht der Server um den es ging, das ist der Mini-PC im Schrank.

    Die große Kiste ist mein NAS. ;)

    4 Mal editiert, zuletzt von fcc123 (18. Oktober 2023 um 12:28)

Glasfaseranbieter jetzt bewerten

Du bist mit deinem Glasfaseranbieter (un)zufrieden?

Dann nutze unsere community-getriebene Bewertungsplattform glasfaseranbieter.de - jetzt mit dem Glasfaserforum Login unkompliziert bewerten!

Jetzt in wenigen Sekunden fair bewerten!
  1. Datenschutzerklärung
  2. Impressum
Community-Software: WoltLab Suite™ 6.2.6

Wir respektieren Deine Privatsphäre

Wir nutzen Cookies und ähnliche Technologien für den Betrieb der Seite, Reichweitenmessung und Werbung. Du entscheidest, was Du erlaubst. Details in unserer Datenschutzerklärung. Deine Auswahl kannst Du jederzeit über den Link „Cookie-Einstellungen“ im Fußbereich ändern.

Cookie-Einstellungen

Wähle aus, welche Kategorien Du erlaubst. Für jede Kategorie kannst Du über „Details anzeigen“ sehen, welche Cookies und Skripte konkret geladen werden, welche Empfänger beteiligt sind und wie lange gespeichert wird.

Weitere Informationen: Datenschutzerklärung · Impressum