This project allows any ubuntu or linux computer to block internet access for a specified period of time. This is extremely handy for turning the internet off for a specific user in the evening and re-enabling in the morning.
Download and extract internetblocker-master.zipcd internetblocker-master
Edit cron.d/internetblocker to include the username to block. To block more than one user, copy the cron line and replace the username for each user.
Edit bin/internetblocker.sh to change the start and end hours for blocking to be active.
Copy the cron script into cron
sudo cp cron.d/internetblocker /etc/cron.d/internetblocker
sudo chmod 644 /etc/cron.d/internetblocker
sudo chown root:root /etc/cron.d/internetblocker
sudo cp bin/internetblocker.sh /usr/local/bin/internetblocker.sh
sudo chmod 755 /usr/local/bin/internetblocker.sh
sudo chown root:root /usr/local/bin/internetblocker.sh