Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
To: netfilter@vger.kernel.org
Subject: IP set and match skiping
Date: Sun, 03 Oct 2010 11:20:37 +0200	[thread overview]
Message-ID: <87bp7beioq.fsf@hati.baby-gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

Hello,

Testing xtables-addons[1] 1.30 on a virtual system, I have some
questions for my setup and regarding the xtables-addons next branch[2].

I want to avoid duplication, I have one ipporthash for my DMZ services
(behind a NAT) and would like to be able to skip some tests or fix one
argument:

ipset -N dmz-services ipporthash --network 10.1.1.0/24
ipset -A dmz-services 10.1.1.2,www
ipset -A dmz-services 10.1.1.2,smtp
ipset -A dmz-services 10.1.1.2,ssh

# DNAT by server
# Match only ports 
iptables -t nat -A PREROUTING -i internet -m set --match-set dmz-services skip,dst -j DNAT 10.1.1.2


Another this if several dmz servers hosts different services:

# Add a new service for a new host
ipset -A dmz-services 10.1.1.3,kerberos

# Match services hosted on 10.1.1.2
iptables -t nat -A PREROUTING -i internet -m set --match-set dmz-services 10.1.1.2,dst -j DNAT 10.1.1.2
# Match services hosted on 10.1.1.3
iptables -t nat -A PREROUTING -i internet -m set --match-set dmz-services 10.1.1.3,dst -j DNAT 10.1.1.3

Is it a possible-to-add feature?

Regards.

Footnotes: 
[1]  http://www.baby-gnu.org/debian-asgardr/changelogs/pool/main/x/xtables-addons/xtables-addons_1.30-1/changelog

[2]  http://www.spinics.net/lists/netfilter/msg49256.html

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2010-10-03  9:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-03  9:20 Daniel Dehennin [this message]
2010-10-03 19:19 ` IP set and match skiping Jozsef Kadlecsik

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=87bp7beioq.fsf@hati.baby-gnu.org \
    --to=daniel.dehennin@baby-gnu.org \
    --cc=netfilter@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