1

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)

  • 2
    iptables is a system-wide process, no per-user configuration exists. – waltinator Jun 8 '18 at 13:09
  • 1
    you could achieve what you want by adding 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 just cp -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.. – guiverc Jun 8 '18 at 13:11
  • That sounds extremely finnicky, and if I wanted to manage multiple sites (i.e site A; allow, site B; deny), it would become very difficult very fast. – Epsilon Jun 8 '18 at 13:18
0

As it turns out, according to waltinator, that iptables affects every user on the system at once.

For those of you looking for a GUI, I recommend going here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.