Hi,
Plaese any body clarify my doubt in this rule. I want to restrict whose uid is 501 from outgoing to port number 22.This blocks all.
Code:
$ sudo /sbin/iptables -t filter -A OUTPUT -m owner --uid-owner 501 -j DROP
I tried like this but, no result.
Code:
$ sudo /sbin/iptables -t filter -A OUTPUT -p tcp -m owner --uid-owner 501 --sport 22 -j DROP
and
Code:
$ sudo /sbin/iptables -t filter -A OUTPUT -p tcp -o eth0 -m owner --uid-owner 501 -s 0/0 --sport 22 -j DROP
What will be the rule?