qaz@lemmy.world to Programmer Humor@programming.devEnglish · edit-221 days agoPeak securitylemmy.worldimagemessage-square26linkfedilinkarrow-up18arrow-down10file-text
arrow-up18arrow-down1imagePeak securitylemmy.worldqaz@lemmy.world to Programmer Humor@programming.devEnglish · edit-221 days agomessage-square26linkfedilinkfile-text
minus-squarepiefood@feddit.onlinelinkfedilinkEnglisharrow-up0·20 days agoBefore you make a change, do this in a screen-session: sleep 300 && iptables-restore old_fw_rules.bak
minus-squareItdidnttrickledown@lemmy.worldlinkfedilinkarrow-up0·20 days agoYeah except it would be iptables-restore < old_fw_rules.bak
minus-squarepiefood@feddit.onlinelinkfedilinkEnglisharrow-up1·edit-220 days agoFun fact: When you do iptables-save, you have to redirect the output if you want to save it to a file. But when you use iptables-restore, you don’t need to pipe it back in, you can just use the filename!
Before you make a change, do this in a screen-session:
sleep 300 && iptables-restore old_fw_rules.bak
Yeah except it would be iptables-restore < old_fw_rules.bak
Fun fact: When you do iptables-save, you have to redirect the output if you want to save it to a file. But when you use iptables-restore, you don’t need to pipe it back in, you can just use the filename!