Beiträge von Interessent

    Hallo,


    ich musste einen Snapshot einspielen, weil Firewall und DNS etc nicht mehr richtig funktionierten.


    Wenn ich jetzt meine Docker Container neu ziehen will, erhalten ich das:


    docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

    Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).


    Docker läuft.

    Ich habe schon alle möglichen Google Tipps probiert. Nichts hat geholfen bzw. ist hier relevant (Proxy und so).

    Ubuntu 20.0.4. LTS Server


    Kann jemand weiterhelfen?


    Danke

    Code
    systemctl status ufw.service
    ● ufw.service - Uncomplicated firewall
         Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)
         Active: active (exited) since Thu 2023-04-20 10:40:17 CEST; 1min 20s ago
           Docs: man:ufw(8)
        Process: 380 ExecStart=/lib/ufw/ufw-init start quiet (code=exited, status=0/SUCCESS)
       Main PID: 380 (code=exited, status=0/SUCCESS)
    root@srv2:/home/xxx# ufw status
    ERROR: problem running iptables: Another app is currently holding the xtables lock. Perhaps you want to use the -w option?

    Das funktioniert jetzt schon mal, und bleibt auch nach einem Neustart erhalten. Pings etc gehen wieder. DNS scheint repariert...


    UFW lässt sich dagegen immer noch nicht wieder aktivieren:

    ufw status

    ERROR: problem running ip6tables

    Wie gesagt, ich hab das, was hier empfohlen wurde umgesetzt...

    Trotzdem Danke.

    Ich probier das die Tage nochmal, und wenn nix geht, dann eben Snapshot wieder drauf. Den rest wiederherstellen aus Backups dauert auch nciht länger als Fehlersuche

    Sorry, aber jetzt funktioniert gar nix mehr.


    Keine resolv.conf mehr, kein ufw aktivierbar.


    Danke erstmal allen für die vielen Antworten. Heute kann ich mich nicht mehr weiter damit beschäftigen.

    Vll ist es auch sinnvoller einen Snapshot zurückzuspielen.

    Code
    systemctl disable --now systemd-resolved

    Und dann kann man auch fixe Werte in der resolv.conf haben.

    Generell sollte man bei Servern im Netz immer statische Werte nutzen. Das kann ziemlich aergerlich sein, wenn mal irgendein Automatismus nicht funktioniert und Du eine falsche IP bekommst oder keine, weil der DHCP weg ist..

    Jetzt bin ich überfordert. Meinst du mit dem DHCP 127.0.0.53?

    Code
    systemctl disable --now systemd-resolved

    Deaktiviert systemd-resolved und nimmt nur die Einträge in der resolv.conf. Richtig verstanden?

    In der /run/systemd/resolve/stub-resolv.conf sind die Nameserver geändert.

    dig google.de nimmer auch den 1.1.1.1


    ufw kann aber nciht mehr aktiviert werden, gleiche Fehlermeldung wie vorher


    Hab nochmal einen reboot gemacht =>

    /run/systemd/resolve/stub-resolv.conf

    alle Einträge wieder automatisch geändert und 1.1.1.1 und 8.8.8.8 weg...

    Jepp. in die /etc/resolv.conf folgendes eintragen:

    Code
    nameserver 1.1.1.1
    nameserver 8.8.8.8

    Und deine Probleme sollten erstmal erledigt sein.

    Danach deine IP statisch setzen und fixe Einstellungen nutzen.

    Also ich schwöre bei nameserver 8.8.8.8 , wie ich es schon mal getestet habe ging nix.


    Gerade in eingetragen:

    Code
    nameserver 1.1.1.1
    nameserver 8.8.8.8

    ufw läst sich aktivieren alles fein.


    Erneute Pürfung von /etc/resolv.conf:


    nameserver 127.0.0.53

    options edns0 trust-ad

    50-cloud-init.yaml:

    network:
    version: 2
    renderer: networkd
    ethernets:
    eth0:
    addresses:
    - 202.61.254.xy/22
    - 2a03:4000:55:d7d:6805:ecff:fe41:xxxx/64
    gateway4: 202.61.252.1
    gateway6: fe80::1
    match:
    macaddress: 6a:05:ec:41:a0:xy

    Hast du überhaupt einen lokalen Nameserver installiert? Mir kommt das alles sehr komisch vor. Was steht in /etc/network/interfaces? Falls das nicht über netplan gelöst ist bei Ubuntu…

    Wie gesagt, an der reslov.conf hab ich nie was geändert.


    GNU nano 4.8 /etc/network/interfaces
    # ifupdown has been replaced by netplan(5) on this system. See
    # /etc/netplan for current configuration.
    # To re-enable ifupdown on this system, you can run:
    # sudo apt install ifupdown

    Ja das IP Blacklist Skript, lädt die IPs für die Blacklisten.

    Das aber schon 2 Jahre ohne geändert worden zu sein


    /etc/resolv.conf:

    # This file is managed by man:systemd-resolved(8). Do not edit.
    #
    # This is a dynamic resolv.conf file for connecting local clients to the
    # internal DNS stub resolver of systemd-resolved. This file lists all
    # configured search domains.
    #
    # Run "resolvectl status" to see details about the uplink DNS servers
    # currently in use.
    #
    # Third party programs must not access this file directly, but only through the
    # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
    # replace this symlink by a static file or a different symlink.
    #
    # See man:systemd-resolved.service(8) for details about the supported modes of
    # operation for /etc/resolv.conf.

    nameserver 127.0.0.53
    options edns0 trust-ad

    Und ja DNS hatte ich schon mal getauscht. Ändert aber weder an der UFW Thematik noch am DNS Problem was


    Immerhin hat sich was geändert:

    ufw status
    Status: inactive
    ufw enable
    Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
    ERROR: problem running ufw-init
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    iptables-restore v1.8.4 (legacy): Couldn't load target `ufw-skip-to-policy-input':No such file or directory

    Error occurred at line: 19
    Try `iptables-restore -h' or 'iptables-restore --help' for more information.
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    iptables-restore v1.8.4 (legacy): Couldn't load target `ufw-user-input':No such file or directory

    Error occurred at line: 2
    Try `iptables-restore -h' or 'iptables-restore --help' for more information.

    Problem loading ipv6 (skipping)
    Problem running '/etc/ufw/before.rules'
    Problem running '/etc/ufw/after.rules'
    Problem running '/etc/ufw/user.rules'