Find the answer to your Linux question:
Results 1 to 3 of 3
Hello there. I'm looking for a way to monitoring iptables processes. Since iptables acts directly into the kernel (correct me if I'm wrong), I tried to look into /proc to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2011
    Posts
    1

    Monitoring iptables processes


    Hello there.

    I'm looking for a way to monitoring iptables processes.
    Since iptables acts directly into the kernel (correct me if I'm wrong), I tried to look into /proc to search for something interesting but found nothing.

    Sometimes, some rules just don't work and I cannot know why, I need some monitoring tool, something like a grep, to see exactly what is iptables doing with some packet.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Try the "LOG" function of iptables. It's not great but it is a start. See this thread for an example.

  3. #3
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    The simplest way would be to:

    Code:
    $ iptables -L -v
    which lists all rules and the packet count (byte count) they matched. Together with the -Z switch you can actually get to pretty good snapshots and troubleshoot problems:

    Code:
    $ iptables -L -Z -v
    But there's still the logging specified before that obviously can dump more information. Make sure to disable logging when you don't troubleshoot problems as it uses CPU cycles and fills the disk.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •