From: Enrico <ebutera@gmail.com>
To: netfilter@lists.netfilter.org
Subject: [libipq] local connections problem
Date: Sun, 7 Nov 2004 15:21:23 +0000 [thread overview]
Message-ID: <414e0fc9041107072145372ffc@mail.gmail.com> (raw)
Hi, i'm using libipq to develop a small application that blocks
connections from/to hosts if they are in a "black" list. It works fine
for outgoing and incoming traffic but when i try to connect to
localhost or loopback (for ex: ftp 127.0.0.1 or using localhost ip) it
refuses to connect giving a "Connection reset by peer" error. If i try
to connect to a non-opened port it correctly says "Connection
refused".
This is how i QUEUE packets to my app:
iptables -A INPUT -p tcp -m state --state NEW -j QUEUE
iptables -A OUTPUT -p tcp -m state --state NEW -j QUEUE
The only way to make local connections work again is to explicitly
ACCEPT them (before QUEUE'ing them) with:
iptables -I INPUT -p tcp -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
Chains policy is set to ACCEPT.
I repeat that all the other traffic works fine. I don't understand why
i have to do that, any suggestions?
Enrico
reply other threads:[~2004-11-07 15:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=414e0fc9041107072145372ffc@mail.gmail.com \
--to=ebutera@gmail.com \
--cc=netfilter@lists.netfilter.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