OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: R Dicaire (rdicaireardynet.com)
Date: Sat Oct 06 2001 - 12:58:01 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On 04 Oct 2001 05:12:50 -0500
    "Lance" <lance_ttbellsouth.net> wrote:

    > What are some simple methods to log packets, both filtered and
    > unfiltered with iptables?
    >
    > I've defined log chains at the end of my firewall script but nothing
    > comes up in the logs.

    Create a predefined target ruleset like:

    # ICMP Target Ruleset
    PROG=/path/to/iptables
    $PROG -N ICMP_PACKETS
    $PROG -A ICMP_PACKETS -j LOG --log-level 5 --log-prefix "TL0G_ICMP: "
    $PROG -A ICMP_PACKETS -j ACCEPT

    What the above target does is logs all icmp packets, and also allows them through.

    Then set a rule that uses the target (-j) ICMP_PACKETS

    iptables -A INPUT -p icmp -s 0/0 -d your_ip -i your_iface -j ICMP_PACKETS

    ----------------------------------------------------
                      Richard Dicaire
               Co-owner/Systems Administrator
                K&R Information Technologies
                   http://www.kritek.com
    ----------------------------------------------------
                   Brainbench Certified
             Master Unix & Linux Administrator
    http://www.brainbench.com/transcript.jsp?pid=67584
    ----------------------------------------------------
                     Home & aRDy Music
                 http://rdb.linux-help.org
    ----------------------------------------------------