3 ms·
I wanted to shutdown VPN interface eth0, but ended up shutting down eth1 while I was logged in via SSH Not done that exact one, but I've added firewall rules t
by chalst 16y ago
I wanted to shutdown VPN interface eth0, but ended up shutting down eth1 while I was logged in via SSH
Not done that exact one, but I've added firewall rules that cut me out in exactly the same way.
Another favourite is typing "shutdown -h now" into the wrong terminal: I know a few people who have admitted to doing that.
- kree10 16y agoI always hated remote firewall changes. I usually had two terminals open. In one, I'd run my "cya" script that slept for a minute, restored the old firewall rules, slept another minute, then did a reboot. In the other terminal, I'd run the new firewall rules. If I didn't screw up, I'd go back to the other terminal to stop the "cya" script. If I did screw up, the worst case was a few minutes of downtime that I'd hope nobody would notice.
- gnosis 16y agoYou could also just save the current firewall config, and then have the script restore the saved config after a minute. No need to reboot.
- kree10 16y agoThe script was: sleep 1 minute, then restore rules, sleep 1 more minute, then reboot. That first rule restore was so I could conceivably get things back in order before the reboot. I had the final reboot there in case the new firewall rules somehow killed my ssh session. This never happened, and I might have been able to ssh in again at that point, but I wasn't going to count on it.
- Dobbs 16y agoI use either `at(1)` or a 5 min cron job that restores the firewall rules.
- lamby 16y ago> Another favourite is typing "shutdown -h now" into the wrong terminal: I know a few people who have admitted to doing that. http://packages.debian.org/sid/molly-guard http://packages.debian.org/sid/molly-guard is a good remedy for this :)
- xiongchiamiov 16y agoAnother favourite is typing "shutdown -h now" into the wrong terminal: I know a few people who have admitted to doing that. I do that less now that the machine's hostname is prominently displayed in my prompt.
- deleted 16y ago[deleted]
- code_duck 16y agoGuilty of "Typing UNIX Commands on Wrong Box" here. I thought I was logged into my home server. Turns out I shut down the main web server. Oops!