Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Pavel Volkov <sailor@lists.xtsubasa.org>
Cc: netfilter@vger.kernel.org
Subject: Re: Error configuring NAT with nftables
Date: Tue, 23 Sep 2014 20:31:31 +0200	[thread overview]
Message-ID: <20140923183131.GA18253@salvia> (raw)
In-Reply-To: <86bab9a1-ef10-4d20-aaac-22889659815f@lists.xtsubasa.org>

On Tue, Sep 23, 2014 at 09:35:38PM +0400, Pavel Volkov wrote:
> I've used nftables to perform filtering for a while and today I
> tried to configure it for NAT.
> 
> I took the example from nftables wiki [1]:
> % nft add table nat
> % nft add chain nat prerouting { type nat hook prerouting priority 0 \; }
> % nft add chain nat postrouting { type nat hook postrouting priority 0 \; }
> 
> The first command completes fine, but the second gives me an error:
> # nft add chain nat prerouting { type nat hook prerouting priority 0 \; }
> <cmdline>:1:1-66: Error: Could not process rule: No such file or directory
> add chain nat prerouting { type nat hook prerouting priority 0 ; }
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Also tried this way:
> # nft -f /etc/nftables/ipv4-nat /etc/nftables/ipv4-nat:3:1-2: Error:
> Could not process rule: No such file or directory
> table nat {
> ^^
> /etc/nftables/ipv4-nat:3:1-2: Error: Could not process rule: No such
> file or directory
> table nat {
> ^^
> 
> I'm using nftables 0.3 with kernel 3.16.3. Can you help me with it?

Does your .config contain:

CONFIG_NFT_CHAIN_NAT_IPV4=m

# lsmod | grep nft_chain_nat_ipv4
nft_chain_nat_ipv4     12684  2

  reply	other threads:[~2014-09-23 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 17:35 Error configuring NAT with nftables Pavel Volkov
2014-09-23 18:31 ` Pablo Neira Ayuso [this message]
2014-09-23 20:22   ` Pavel Volkov

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=20140923183131.GA18253@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter@vger.kernel.org \
    --cc=sailor@lists.xtsubasa.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