All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Knorr <bradley@knorrfamily.org>
To: netfilter@vger.kernel.org
Subject: Need help
Date: Mon, 25 Oct 2021 21:53:13 -0700	[thread overview]
Message-ID: <dc004311d37bb7332b649c4973b0cbed@mail.gmail.com> (raw)

I am new to nft commands.  I wish to use the map feature for port
forwarding.  What I want to achieve is the following

Sftp  incoming  to port 2222 on the public IP to be port forwarded to
private IP on port 22.  So what I found in the docs is this.

% nft add map nat foo { type inet_service : ipv4_addr . inet_service \; }

% nft add element nat foo { \
    1100 : 192.168.1.2 . 5061, \
    1101 : 192.168.1.3 . 5061, \
    1400 : 192.168.1.4 . 5061 \
}
% nft add rule nat pre ip protocol tcp dnat ip addr . port to tcp dport
map @foo


So when I issue the first command I get the following error:
Error: unqualified mapping data type specified in map definition

When I issue the command:  nft add map nat foo { type inet_service :
ipv4_addr \; }

It works just fine.  I am at a loss as to why this is happening.  The
reason I need the mapping is I need to add and remove port forwarding
rules easily with a simple command.

Any help would be greatly appreciated.
Brad

             reply	other threads:[~2021-10-26  4:53 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  4:53 Brad Knorr [this message]
2021-10-26  7:14 ` Need help Daniel
  -- strict thread matches above, loose matches on Subject: below --
2021-07-06  5:27 priyabrata mishra
2019-07-24  7:10 Gobinda Nandi
2019-07-24 16:16 ` Emily Shaffer
2012-07-13 11:13 Need Help rakesh
2008-01-30 10:40 need help Daniel Vera
2008-01-17 14:35 Need Help Nath, Varun
2008-01-17 18:24 ` Pradipmaya Maharana
2008-01-17 18:34   ` Nath, Varun
2008-01-17 18:40     ` Pradipmaya Maharana
2008-01-17 20:15       ` Nath, Varun
2008-01-17 20:28         ` Pradipmaya Maharana
2008-01-17 20:35           ` malahal
2008-01-17 20:39             ` Nath, Varun
2008-01-17 20:45               ` Nath, Varun
2008-01-17 21:10                 ` Nath, Varun
2008-01-17 21:34                   ` Chandra Seetharaman
2008-01-17 21:37                     ` Nath, Varun
2008-01-17 22:43                       ` Pradipmaya Maharana
2008-01-17 21:12                 ` Pradipmaya Maharana
2008-01-17 21:13                   ` Nath, Varun
2008-01-21 17:37                     ` Nath, Varun
2008-01-17 20:30         ` malahal
2008-01-17 20:36           ` Nath, Varun
2008-01-17 20:44             ` malahal
2008-01-17 20:46               ` Nath, Varun
2008-01-17 18:37 ` Chandra Seetharaman
2008-01-17 18:40   ` Nath, Varun
2008-01-17 19:02     ` Chandra Seetharaman
2008-01-17 19:09       ` Pradipmaya Maharana
2008-01-17 19:18         ` Chandra Seetharaman
2008-01-17 20:05       ` Nath, Varun
2008-01-17 20:15         ` malahal
2008-01-17 20:14       ` malahal
2008-01-17 20:24         ` Nath, Varun
2008-01-13 11:09 Need help Ramachandran ms
2008-01-13 13:59 ` Nick Kossifidis
     [not found] <002501c7e6c8$a6079170$a378c00a@chia>
2007-08-27  2:43 ` Tejun Heo
     [not found] <86Xi2-6La-421@gated-at.bofh.it>
2007-04-06 21:24 ` need help Bodo Eggert
2007-04-06  7:49 vjn
2007-04-08 18:00 ` Bill Davidsen
2007-02-19 13:45 Need help Lina
2005-12-06  5:14 need Help arijit.sinharay
2005-12-06  6:02 ` Komal Shah
2005-03-22  5:15 Need help Naveen Kumar Atmakuri
2005-03-22 21:36 ` Kumar Gala
2004-04-16 19:17 need help Khanh Tran
2004-04-16 18:28 Matt Robineau
2004-04-16 19:26 ` Antony Stone
2004-04-16 17:32 Xen cpu usage limting Mark Williamson
2004-04-20 15:44 ` Need help I RATTAN
2004-04-20 16:27   ` Borut Mrak
2004-04-20 18:02   ` I RATTAN
2004-04-20 18:23     ` Rolf Neugebauer
2004-04-21  0:24   ` I RATTAN
2003-10-30  7:51 need help Pius Jerry
2003-10-30  9:30 ` Nick Piggin
2003-07-23 20:46 Need HELP Vladimir Vanyukov
2003-04-29 10:21 need help Karthik RC
2003-04-29  6:43 ` hare ram
2003-04-29  7:35 ` Julius Wijaya
2003-04-29  9:27 ` Maciej Soltysiak
2003-02-06 14:35 Need help Yates, Ben
2002-09-27 11:08 Need Help Mohammad Shakir
2002-09-29 22:26 ` Davide
2002-09-29 22:40   ` Antony Stone
2002-08-10  1:14 Need help Muhammad Farooq Bhatti
2002-08-09 14:10 ` Patrice DUMAS - DOCT
2002-08-09 14:24 ` Andreas Behnert
     [not found] <3D04BA0E.7000702@metaparadigm.com>
2002-06-13 14:21 ` need help manjuanth n
2002-06-13 14:21 ` manjuanth n
2002-06-08 11:27 manjuanth n
2002-06-08 19:43 ` Michael Clark
2002-06-10 14:21   ` manjuanth n
2002-06-10 17:04     ` Patrick Mansfield
2002-06-13 14:25   ` manjuanth n
2002-06-13 14:25   ` manjuanth n
2000-01-10 19:30 Need Help Pravin Pathak
2000-01-12  9:35 ` Gabriel Paubert

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=dc004311d37bb7332b649c4973b0cbed@mail.gmail.com \
    --to=bradley@knorrfamily.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 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.