After reading the comments on today's Disconnecting Distraction essay by PG (https://hackernews.hn/item?id=192654), I realized that I wanted to throttle my internet usage, not relegate it to a few times during the day. That way, I could still spend some time online, but the "Unable to connect" page would set off alarms. Is there anyone out there who uses iptables to prevent procrastination?
Not having used iptables before, but knowing that I wasn't blocking anything because I'm behind a router firewall, I read the man page and implemented some rules that throttled my hourly connections to 200:
iptables -A OUTPUT -p ! tcp -j ACCEPT
iptables -A OUTPUT -p tcp --dport ! 80 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 80 -m limit --limit 400/hour --limit-burst 500 -j ACCEPT
iptables -A OUTPUT -j REJECT
Surprisingly, after implementing these commands, I searched on Google and didn't find any mentions of iptables preventing procrastination. Surely I'm not the only one to have thought of this idea, but it didn't feel right to comment this late on the original article and not help anyone. It's helped me significantly so far, and even made submitting this question a bit tricky. So, hopefully these commands help someone else, and if you have better rules, feel free to share...