Disable internet access for particular user in Ubuntu

This is very useful if you want to block internet access to your kids or particular users. First you need to edit the network interfaces file using the following command:

        sudo vi /etc/network/interfaces

or

        sudo gedit /etc/network/interfaces

Now you need to add the simple iptables rule to the interfaces file when the internet connection starts up: