This is a joke, I didn’t really lock myself out

  • mavu@discuss.tchncs.de
    link
    fedilink
    arrow-up
    109
    ·
    25 days ago

    even worse. I regularly have to get up out of my chair and go down 2 stairs.

    Also this took a while to find, but : https://sourceforge.net/p/shorewall/svn/HEAD/tree/branches/4.2/Samples/one-interface/shorewall.conf

    ADMINISABSENTMINDED=Yes

    Is an actual setting in the config for the (now apparently unmaintained) Shorewall Firewall software/tool for linux.

    If I remember correctly, it always checks on firewall rule changes if there is an active connection on port 22, and adds a special rule at the end to maintain that connection.

    They don’t build them like they used to anymore.

    • Jankatarch@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      edit-2
      25 days ago

      They don’t build them like they used to anymore.

      Well if we did, the way it works would be by telling a chatbot to enable ssh on port 22 at the end.

  • piefood@feddit.online
    link
    fedilink
    English
    arrow-up
    71
    ·
    25 days ago

    Before you make a change, do this in a screen-session:

    sleep 300 && iptables-restore old_fw_rules.bak

  • randint@lemmy.frozeninferno.xyz
    link
    fedilink
    English
    arrow-up
    63
    ·
    25 days ago

    Almost the same thing happened to me. I accidentally fucked up the internet connection in my home while in Japan, and I had to video call my mom to have her fix it. It was a pain for both of us, but thankfully it went rather smoothly. Thank you mom!

      • Honytawk@feddit.nl
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        23 days ago

        Most corporate network devices like Cisco will reset their config to the one written in memory when they lose power.

        So in that case, just unplug and replug them to restore to previous config.

        Just make sure you write your new config to memory or it will reset when there is ever a power failure.

      • randint@lemmy.frozeninferno.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        23 days ago

        So I connected through ssh back home to fiddle with the router settings, and in the PPPoE settings (where you set a pair of username and password that your router sends to the ISP such that the ISP knows you and knows what IP to assign to you) I made a typo, and apparently that instantly killed the internet connection at home and also for me. I had to call my mom to instruct her to fix the typo in the username. TBH I don’t know that much about PPPoE either, I only do it so that the ISP assigns us the same IP address every time.

  • Björn Tantau@swg-empire.de
    link
    fedilink
    arrow-up
    34
    ·
    25 days ago

    Classic.

    Love Hetzner. If something like that were to happen to me they can hook up a remote console accessible through their web interface.

  • medem@lemmy.wtf
    link
    fedilink
    arrow-up
    25
    ·
    edit-2
    25 days ago

    Since that happens to the best of us, I envision writing a wrapper script around {n,}pfctl that asks for confirmation upon detecting that you’re logged in via ssh through a specific port AND detecting that the new rules would block that port.

    • dbtng@eviltoast.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      25 days ago

      VMware does this with its virtual networking. If a change takes it offline, it automatically rolls it back. It can be frustrating at times, but mostly its saved my ass.

      • Honytawk@feddit.nl
        link
        fedilink
        arrow-up
        1
        ·
        23 days ago

        Meraki does this as well. If you change anything that might disconnect the uplink or the port you are connected to, it gives you a pop-up warning before it commits.

  • rmuk@feddit.uk
    link
    fedilink
    English
    arrow-up
    17
    ·
    23 days ago

    I’ll always be grateful for the firewalls like OpenWRT that will automatically revert any changes if you don’t log back in after a few minutes (at least on the web interface). I’m not proud of how many times that’s saved me.

  • dbtng@eviltoast.org
    link
    fedilink
    English
    arrow-up
    14
    ·
    25 days ago

    This is the NetAdmin’s problem. And he’s got 3 ways to get into the datacenter, so he goddamn well better have an answer that doesn’t involve airfare. Worst case, he’s gotta use remote hands, but that would be embarrassing, and I’d not let him forget it. Nobody forgives me when I screw up a server cluster, so he gets no latitude when he takes a datacenter offline.

  • observantTrapezium@lemmy.ca
    link
    fedilink
    arrow-up
    11
    ·
    25 days ago

    Does it actually happen to people? All servers I worked with both had a back door (or two), and someone at the data centre (during work hours at least) you could contact in an emergency.

    • tvbusy@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      7
      ·
      25 days ago

      Most data centers have some kind of service where you can request a KVM to be connected to the server. It’s not instant as an actual human has to do so but a lot sooner than another human driving long distance. I guess in this case, it’s a mid size company that is big enough to have multiple locations yet small enough to still manage to use on-premise infra instead of data centers.

    • onlinepersona@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      24 days ago

      iptables default DENY and flush the rules. Done by at least two people I know (then me) at the same company. Led to them moving the servers in-house and virtualizing some services to connect to the hypervisor. It does happen though.

      Anti Commercial-AI license