Linux Netfilter development
 help / color / mirror / Atom feed
From: Simon Labrecque <simon@clubbeadplus.com>
To: <netfilter-devel@vger.kernel.org>
Subject: Permit *any* destination port from source ip
Date: Mon, 19 Jan 2009 15:11:11 -0500	[thread overview]
Message-ID: <C59A488F.D281%simon@clubbeadplus.com> (raw)

Hi,

   I would like to have a specific connection act like an "authentication"
service; that is, when a connection to a specific port is made and once the
required data has passed between the 2 hosts, the client is now
authenticated, permitting access to other network services which are flagged
with the RELATED state (and not the NEW one).

   I implemented this in a very simple conntrack module. For example, I can
use something like when the module is in place:

iptables -A INPUT -p tcp --dport 22 -m state --state ESTABLISHED,RELATED -j
ACCEPT

   ...and it works once the "parent" connection has "authenticated" the
client.

   However, currently it seems I can only specify 1 single destination port
in the expectation (this would be port 22 in my example above), wherever I
would like to be able to support *any* port (as we can with the source
port). The filtering would then be made using subsequent iptables rules.

   Is this possible? It seems it was possible a while ago (while
exp->mask.dst was still present), but this was removed and I don't see how I
can achieve the same functionality with the current structures. Am I missing
something?


   Thanks a lot!
-- 
Simon Labrecque



             reply	other threads:[~2009-01-19 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 20:11 Simon Labrecque [this message]
2009-01-19 20:14 ` Permit *any* destination port from source ip Jan Engelhardt
2009-01-19 20:27   ` Simon Labrecque
2009-01-19 20:34     ` Jan Engelhardt
2009-01-19 21:26       ` Simon Labrecque

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=C59A488F.D281%simon@clubbeadplus.com \
    --to=simon@clubbeadplus.com \
    --cc=netfilter-devel@vger.kernel.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