All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables LOG options
@ 2005-05-24  3:38 Binish A R
  2005-05-24  4:00 ` Robert Vangel
  0 siblings, 1 reply; 9+ messages in thread
From: Binish A R @ 2005-05-24  3:38 UTC (permalink / raw)
  To: netfilter

Hello,

I am trying to write my custom firewall rules.
I want to drop all outgoing ssh for non root users and log any such attempts at the same time.
I want to log the username trying to do that. What option should I give?

The following won't definitely work.

iptables -I OUTPUT -p tcp --dport 22  -m owner ! --uid-owner root -j LOG --log-prefix "$USER NO SSH ALLOWED"

because the shell expands $USER variable immediately.

Is there any other option to find the value of owner that get matched by the below rule:


iptables -I OUTPUT -p tcp --dport 22  -m owner ! --uid-owner root


Any help is much appreciated.


Thanks and Regards,

Binish




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-05-25  6:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-24  3:38 iptables LOG options Binish A R
2005-05-24  4:00 ` Robert Vangel
2005-05-24  4:17   ` Binish A R
2005-05-24  5:01     ` Robert Vangel
2005-05-24  5:16       ` Binish A R
2005-05-24  5:30         ` Robert Vangel
2005-05-24  5:39           ` Binish A R
2005-05-24 14:43       ` Taylor, Grant
2005-05-25  6:55         ` R. DuFresne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.