Time based access control with iptables, cron and at

Until today I handled scheduled internet access for my daughters devices via my Apple AirPort Extreme that is configured as a bridge between my wired and my wireless network at home.

This setup has worked flawlessly for quite some time. There is one catch to this set up though. Each time I want to make an exception to the time based internet access rules I need to reconfigure and restart the AirPort Extreme. The restart takes a minute or two during which there is no wireless network for anyone at home. I guess that you can relate to the sheer panic that occurs in our home during that time.

The router/firewall/server/etc that I run at home is a Ubuntu 16.04 box running on a physical machine with two network cards. This machine now handles the time based internet access.

I decided to use iptables, cron and at in a small shell script, that you can find at the end of this article, since they are all proven tools that I am familiar with.
Continue reading “Time based access control with iptables, cron and at”

Simple iptables firewall script with NAT and SFQ sceduling

I have been working with firewalls and security for quite many years at this point. Therefore friends and people I know ask me every now and then to write a firewall script for them. So instead of basically writing the same script over and over again I decided to write this article that explains how you can set up a basic iptables box by yourself. Continue reading “Simple iptables firewall script with NAT and SFQ sceduling”