Linux Netfilter discussions
 help / color / mirror / Atom feed
* [nft 0.9.3 | kernel 5.4.48] cannot get NAT to work
@ 2020-06-23 20:38 ѽ҉ᶬḳ℠
  2020-06-23 21:23 ` Florian Westphal
  0 siblings, 1 reply; 15+ messages in thread
From: ѽ҉ᶬḳ℠ @ 2020-06-23 20:38 UTC (permalink / raw)
  To: netfilter


[-- Attachment #1.1.1: Type: text/plain, Size: 3479 bytes --]

Since the ruleset that worked with kernel 4.19 did not anymore with 
kernel 5.4 (throwing segfault) I started from scratch to see what gives.

nft add table inet filter
nft add chain inet filter input { type filter hook input priority 0 \; }
nft add chain inet filter forward { type filter hook forward priority 0 \; }
nft add chain inet filter output    { type filter hook output priority 0 
\; }
nft add table inet nat

Thus far good and then things go awry and the output does not help to 
understand what might be wrong:

nft add chain inet nat prerouting { type nat hook prerouting priority 
\-100 \; }
nft: unrecognized option: 1

and next up

nft add chain inet nat postrouting { type nat hook postrouting priority 
100 \; }
Error: Could not process rule: No such file or directory

Has there been some syntax change for NAT?  Checked the kconf and loaded 
module but don't see anything amiss?

xzgrep _NAT /proc/config.gz
CONFIG_NF_NAT=m
CONFIG_NF_NAT_AMANDA=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
CONFIG_NF_NAT_SIP=m
CONFIG_NF_NAT_TFTP=m
CONFIG_NF_NAT_REDIRECT=y
CONFIG_NF_NAT_MASQUERADE=y
CONFIG_NFT_NAT=m
CONFIG_NETFILTER_XT_NAT=m
CONFIG_NF_NAT_SNMP_BASIC=m
CONFIG_NF_NAT_PPTP=m
CONFIG_NF_NAT_H323=m
CONFIG_IP_NF_NAT=m
CONFIG_IP6_NF_NAT=m
CONFIG_BRIDGE_EBT_T_NAT=m
# CONFIG_NET_ACT_NAT is not set

lsmod | grep 'nf_nat\|nft_nat'
nf_nat_amanda          16384  0
nf_conntrack_amanda    16384  4 nf_nat_amanda
nft_nat                16384  0
nf_tables             114688  28 
nft_ct,nft_reject_bridge,nft_nat,nft_numgen,nft_fwd_netdev,nf_flow_table_ipv6,nft_redir,nf_flow_table_ipv4,nft_fib_inet,nft_reject,nft_reject_ipv6,nft_reject_ipv4,nft_limit,nf_tables_set,nft_dup_netdev,nft_flow_offload,nf_flow_table_inet,nft_meta_bridge,nft_masq,nft_fib,nft_reject_inet,nft_fib_ipv6,nft_objref,nft_fib_ipv4,nft_hash,nft_quota,nft_counter,nft_log
nf_nat_tftp            16384  0
nf_nat_snmp_basic      16384  0
nf_nat_sip             20480  0
nf_nat_pptp            16384  0
nf_nat_irc             16384  0
nf_nat_h323            16384  0
nf_nat_ftp             16384  0
nf_nat                 32768  14 
nft_nat,nf_nat_pptp,nft_redir,xt_nat,nf_nat_h323,nf_nat_sip,nf_nat_irc,xt_MASQUERADE,iptable_nat,nft_masq,nf_nat_ftp,nf_nat_amanda,xt_REDIRECT,nf_nat_tftp
nf_conntrack_tftp      16384  4 nf_nat_tftp
nf_conntrack_snmp      16384  4 nf_nat_snmp_basic
nf_conntrack_sip       28672  7 nf_nat_sip
nf_conntrack_pptp      16384  4 nf_nat_pptp
nf_conntrack_irc       16384  4 nf_nat_irc
nf_conntrack_h323      45056  7 nf_nat_h323
nf_conntrack_ftp       16384  4 nf_nat_ftp
nf_conntrack           81920  39 
nft_ct,xt_state,nft_nat,nf_nat_pptp,nf_conntrack_sip,nft_redir,act_ctinfo,nf_conntrack_snmp,nf_conncount,nf_conntrack_irc,xt_nat,nf_nat_h323,act_connmark,nf_flow_table,nf_conntrack_ftp,nf_nat_snmp_basic,nf_nat_sip,nf_conntrack_tftp,nft_flow_offload,nf_nat_irc,xt_MASQUERADE,xt_connmark,nf_conntrack_pptp,nft_masq,nf_conntrack_amanda,nf_conntrack_rtcache,xt_helper,nf_conntrack_broadcast,nf_nat_ftp,nf_nat_amanda,xt_connlimit,nf_conntrack_netlink,xt_connbytes,xt_CT,nf_conntrack_h323,xt_conntrack,xt_REDIRECT,nf_nat_tftp,nf_nat
asn1_decoder           16384  2 nf_nat_snmp_basic,rsa_generic

[-- Attachment #1.1.2: OpenPGP_0xF4F735931F05C5CE.asc --]
[-- Type: application/pgp-keys, Size: 3155 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-06-26  3:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23 20:38 [nft 0.9.3 | kernel 5.4.48] cannot get NAT to work ѽ҉ᶬḳ℠
2020-06-23 21:23 ` Florian Westphal
2020-06-23 21:34   ` ѽ҉ᶬḳ℠
2020-06-23 21:52     ` Florian Westphal
2020-06-23 22:12       ` ѽ҉ᶬḳ℠
2020-06-23 22:48         ` Florian Westphal
2020-06-23 23:11           ` ѽ҉ᶬḳ℠
2020-06-24  8:14             ` Florian Westphal
2020-06-24  8:47               ` ѽ҉ᶬḳ℠
2020-06-24  8:53                 ` Florian Westphal
2020-06-24  8:59                   ` ѽ҉ᶬḳ℠
2020-06-25  1:45                     ` Duncan Roe
2020-06-25  7:13                       ` ѽ҉ᶬḳ℠
2020-06-25  8:45                         ` ѽ҉ᶬḳ℠
2020-06-26  3:28                           ` Duncan Roe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox