• paperemail@links.rocks
    link
    fedilink
    English
    arrow-up
    7
    ·
    3 days ago

    So something like:

    nft -f newrules.nft; sleep 2m; nft destroy table ip newrules
    
    # newrules.nft
    table ip newrules {
      # …
    }
    

    As long as you run this in tmux, your new firewall rules will be dropped if you don’t cancel this in 2 minutes.

    • Programmer Belch@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 days ago

      Yes, I did something like that, I didn’t enable the systemd service, just started it and gave it a timer in gnu screen to reboot the system. If I wasn’t out of the network, I would just cancel the timer