Solved

log traffic

Posted on 2004-07-30
12
296 Views
Last Modified: 2010-08-05
i need to log all traffic that is being created by a specific uid
the box have multiple nic's if it matters.
the uid dosent belong to a real system user with shell but will show up like #405 in ps where 405 is a uid in a chrooted /ftpd/etc/passwd
where do i start?
i need a full explenation since i dont really have time to read everything on the subject.
0
Comment
Question by:loadet
  • 6
  • 5
12 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 11681186
you need to log "what service" ??

ftp ?
httpd?
 
0
 

Author Comment

by:loadet
ID: 11681209
does it matter?
i need to log all traffic from that uid
but its a ftpd .. not the standard ftpd service.
and i did try something like iptables -A OUTPUT -m owner --uid-owner 405
but it just gets me a iptables: Invalid argument
0
 
LVL 6

Expert Comment

by:de2Zotjes
ID: 11681557
check if you have the owner module for ip tables. It should be in the modules subtree on your system ( /lib/modules/`uname -r`/kernel/net/ipv4/netfilter )

You are probably missing the module.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:loadet
ID: 11681577
i have ipt_owner.ko

would that be it?
0
 
LVL 6

Expert Comment

by:de2Zotjes
ID: 11694635
That is the module your need. load it using:

modprobe ipt_owner

after that try your command again:

iptables -A OUTPUT -m owner --uid-owner 405 -j LOG

Should do the trick (just checked on my own machine)

Good Luck
0
 

Author Comment

by:loadet
ID: 11699641
yeah i thought that was the problem too but it was already loaded
FATAL: Module ipt_owner already in kernel.
0
 
LVL 6

Expert Comment

by:de2Zotjes
ID: 11701050
That fatal is not fatal :-)

Does it accept the iptables command without complaining?
0
 

Author Comment

by:loadet
ID: 11701119
no it gives me a
iptables: Invalid argument
im running
iptables v1.2.6a
kernel 2.6.4

lsmod gives me

ipt_owner               4480  0
iptable_filter          3840  1
ip_tables              17168  2 ipt_owner,iptable_filter

so i dont really understand it
0
 
LVL 6

Expert Comment

by:de2Zotjes
ID: 11708094
I did 2 things:

checked my version of iptables and kernel: iptables 1.2.9 and kernel 2.6.7

searched the sources of iptables and the kernel ipfilter modules for the "Invalid argument": it's not there. So whatever is giving this error, it is not in iptables or the kernel modules.

Could you please check what iptables you are executing? (try: which iptables)
0
 

Author Comment

by:loadet
ID: 11712313
start:/home/loadet# which iptables
/sbin/iptables
0
 
LVL 6

Accepted Solution

by:
de2Zotjes earned 250 total points
ID: 11713852
I am at a loss now. I can only sussgest to upgrade your version of the iptables tools and to check again that you get the command line correctly:

/sbin/iptables -A OUTPUT -m owner --uid-owner <numeric> -j LOG
0
 

Author Comment

by:loadet
ID: 11716464
ok i will try that, thanks for trying.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
UPD maximums on Red Hat 6 122
how to view remote client's ipv6 address? 5 78
recommendations for external nmap pen test (from a Windows laptop) 5 169
Issue to mail 11 110
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question