All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Daniel <tech@tootai.net>
Cc: Netfilter list <netfilter@vger.kernel.org>
Subject: Re: Error: conflicting intervals specified - Bullseye 0.9.8
Date: Thu, 16 Sep 2021 14:58:58 +0200	[thread overview]
Message-ID: <20210916125858.GA9451@salvia> (raw)
In-Reply-To: <48e95c8a-2469-08dd-0620-55187252653c@tootai.net>

On Thu, Sep 16, 2021 at 01:27:44PM +0200, Daniel wrote:
> Hello
> 
> Le 16/09/2021 à 11:29, Pablo Neira Ayuso a écrit :
> > On Wed, Sep 08, 2021 at 11:33:02AM +0200, Daniel wrote:
> > > Hi,
> > > 
> > > I get the following error with the above nft version, lan being the
> > > interface name:
> > > 
> > > add element ip6 nat fwdtoip_tcp.lan { 1-65534 : 2001:db8:27b:10:ff9b::,
> > > 1-65534 : 2001:db8:27b:ff9b::c0a8:ad1}
> > > 
> > > with
> > > 
> > > add map ipv6_addr nat fwdtoip_tcp.lan { type inet_service : ipv6_addr\;
> > > flags interval\; }
> > > 
> > > What's wrong here ? My goal being to redirect all (or range ports) external
> > > traffic to another server.
> > Could you develop what your use-case is?
>
> The above example says -in my mind ;)- that everything coming from outside
> on ip
> 
> 2001:db8:27b:10:ff9b:: should be redirect (symmetrical) to ip 2001:db8:27b:ff9b::c0a8:ad1
>
> > Keys uniquely identify an entry in a map, if you define two entries
> > with the same key, you hit this conflict interval error.
>
> I see this like forward port:ip to port:anotherip

so you want to redirect all ports except a few of them?

  add map x mymap { type ipv4_addr : ipv4_addr ; }
  add rule x y ip protocol { tcp, udp } th dport 1-65534 dnat to ip saddr map @mymap

This allows you to dnat depending on the IP source address, skipping 0
and 65535 for TCP and UDP.

I'm not sure yet if this is what you need though

  reply	other threads:[~2021-09-16 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  9:33 Error: conflicting intervals specified - Bullseye 0.9.8 Daniel
2021-09-16  9:29 ` Pablo Neira Ayuso
2021-09-16 11:27   ` Daniel
2021-09-16 12:58     ` Pablo Neira Ayuso [this message]
2021-09-16 13:33       ` Daniel
2021-09-17 10:18       ` Daniel
2021-09-21  0:13         ` Pablo Neira Ayuso
2021-09-28 11:05           ` Daniel
2021-09-28 12:41             ` Daniel
2021-09-28 20:58               ` Pablo Neira Ayuso

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=20210916125858.GA9451@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter@vger.kernel.org \
    --cc=tech@tootai.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.