You want to protect minors from the dirt on the internet or you don’t want your friends to use your home internet connection, then i am going to show you a simple way you can disable web access for specific users, so the internet is not accessable via their user accounts.

First we need to edit the network interface configuration file
sudo gedit /etc/network/interfaces
Now we add a simple iptables rule in the file that runs when the internet connection is active. Simply add this code into either auto wlan0 or eth0 whichever one applies to you.
pre-up iptables -A OUTPUT -p tcp -m owner --uid-owner username -j DROP
Save the file and exit gedit. Now to specify the user name to block. Enter this into a terminal.
sudo iptables -A OUTPUT -p tcp -m owner --uid-owner (user name to block) -j DROP
Login with the user name you set and see if the internet functions or not, if it doesn’t then your rule worked.