How can I block or disable my Ethernet Internet connection, for the guest account only?
Asked
Active
Viewed 2,975 times
2 Answers
3
First you need to edit the network interfaces file.
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.
sudo gedit /etc/network/interfaces
Now you need to add the simple iptables rule to the interfaces file when the internet connection starts up
Simply add this in the interfaces file
pre-up iptables -A OUTPUT -p tcp -m owner --uid-owner username -j DROP
save and exit the file.
Now you need to type in the terminal with the following command
sudo iptables -A OUTPUT -p tcp -m owner --uid-owner username -j DROP
and switch users to the username you blocked and try to access the internet.
Mitch
- 109,787
0
You can use the following command to block particular user:
sudo iptables -A OUTPUT -p tcp -m owner --uid-owner username -j DROP
Alvar
- 17,038
Shekhar Raut
- 297