I'm running Lubuntu 17.10 and I have two accounts; lightning
and scholar
. When logged into the desktop as scholar
I want to block traffic to-and-from https://www.facebook.com/
on scholar
, even while logged in via terminal as lightning
(i.e: using su lightning
and launching firefox under lightning
)
127.0.0.1 facebook.com
to/etc/hosts
file; using a script (or command) adding this entry to the file when you want facebook.com to be disabled, and removing the entry when you want to allow access again.... (ie. script to toggle it into/out of file, or just reverse its current state). you could also have two /etc/hosts (one with it, one without); and justcp -p
them over the /etc/hosts as required... It'll mean facebook.com traffic is routed to localhost which can't respond (unless you ...). You could have this script run when you login..