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

Comments (5)

Loading... Logging you in...
  • Logged in as
This should work with any linux distro.... You can also limit access to a bunch of things in ubuntu goto system>administration>users and groups. Highlight the username and click properties. Click the tab user privileges. You can make a person have access to cdroms, scanners, modems, floppy drives, audio output, system logs, modems,,, etc.etc. This is easier for a new user of linux to limit things for a child or a teacher in a class.
Hi, i want the user to be able to log into the remote computer where Internet is disabled.
How do I do it?
I disabled the internet for the user by the above method .. since then the user is not able to do a remote login to the machine... how do i enable remote logging .. keeping the internet disabled on the remote machine
Hi after doing this i could not login anymore.... it hangs after inputing username and password

Post a new comment

Comments by

Clicky Web Analytics