Hi all,
I want to allow or block a specific user to access the web site and go to the internet. what should i do?
could you give a sample code to block this user.
I want to use iptables as a firewall command.
thanks.
I guess, you could have a group of people which
are allowed to access the internet. Then probably (not tested) you can set only those people to be allowed online with iptables
--gid-owner option (consult
man iptables).
I found this online:
-
iptables -I OUTPUT -o eth0 -m owner --gid-owner nonet -j REJECT
-
("nonet" being the group of users, which are allowed to access the net.) Apparently it does the job.
However, I've not worked with iptables much, so if someone can give more detailed information...
Greetings,
Nepomuk