moonleay@feddit.org to 196@lemmy.blahaj.zoneEnglish · 3 days agoFirewall rulefeddit.orgimagemessage-square10linkfedilinkarrow-up1204arrow-down12
arrow-up1202arrow-down1imageFirewall rulefeddit.orgmoonleay@feddit.org to 196@lemmy.blahaj.zoneEnglish · 3 days agomessage-square10linkfedilink
minus-squarepaperemail@links.rockslinkfedilinkEnglisharrow-up7·2 days agoSo 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.
minus-squareProgrammer Belch@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up3·2 days agoYes, 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
So something like:
# 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.
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