Howto: Disable any Ubuntu users internet access

This is quite simple and very effective, I have used it a few times, its pretty convenient since it looks as if the internet is broke or something :)
Check it:

Simply:
sudo gedit /etc/network/interfaces
Then lets add the simple iptables rule to the interfaces file when the internet connection starts up...
Simply add this under auto wlan0 or auto eth0 in the interfaces file:
pre-up iptables -A OUTPUT -p tcp -m owner --uid-owner mykidsusername -j DROP
Ok now you can try it out:
type in the terminal:
sudo iptables -A OUTPUT -p tcp -m owner --uid-owner mykidsusername -j DROP
and switch users to the username you blocked and try to access the internet...
p00f there ya go
enjoy

Clicky Web Analytics