Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Damijan Sencar <damijan.sencar@zrs-tk.si>
To: netfilter <netfilter@lists.samba.org>
Subject: Re: Logging NEW ssh connections
Date: Fri, 31 May 2002 09:55:42 +0200	[thread overview]
Message-ID: <3CF72C7E.8050006@zrs-tk.si> (raw)
In-Reply-To: 3A5DC36EC1506C40825C05BE65E62AEF0E79B7@neptuno.idea.com.mx

It works now!

Thanx,

Damijan

Omar Castaneda Acosta wrote:

>Make these changes to your firewall script:
>
>if [ -n "`$IPTABLES -L | $GREP log-and-forget`" ]; then
>   $IPTABLES -F log-and-forget
>fi  
>
>....
>
>$IPTABLES -N log-and-forget
>$IPTABLES -A log-and-forget -j LOG --log-level warning --log-prefix
>"[WARNING] "                
>$IPTABLES -A log-and-forget -j RETURN
>
># The next rules should be on the top of INPUT, FORWARD and OUTPUT
>chains
>
>$IPTABLES -A INPUT -p TCP -dport 22 -m state -state NEW -j
>log-and-forget
>$IPTABLES -A FORWARD -p TCP -dport 22 -m state -state NEW -j
>log-and-forget
>$IPTABLES -A OUTPUT -p TCP -dport 22 -m state -state NEW -j
>log-and-forget
>
>
>-----Original Message-----
>From: Damijan Sencar [mailto:damijan.sencar@zrs-tk.si]
>Sent: Thursday, May 30, 2002 7:13 AM
>To: netfilter@lists.samba.org
>Subject: Logging NEW ssh connections
>
>Hi!
>
>I want to log all new ssh connections from Internet to syslogd. I added
>chain as follows but it doesn't log anything.
>
>$IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 22 -m state --state NEW
>-j LOG --log-level DEBUG --log-prefix "NEW SSH IN
> logged"
>$IPTABLES -A tcp_packets -p TCP -s 0/0 --dport 22 -j allowed
>
>
>However it works (logs all packets to syslogd)  if I change state from
>NEW to ESTABLISHED. What could be wrong there?
>
>Thanx,
>
>Damijan
>
>




           reply	other threads:[~2002-05-31  7:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <3A5DC36EC1506C40825C05BE65E62AEF0E79B7@neptuno.idea.com.mx>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CF72C7E.8050006@zrs-tk.si \
    --to=damijan.sencar@zrs-tk.si \
    --cc=netfilter@lists.samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox