Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

iptables: "Extension state is not supported"

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
redblade7
Tux's lil' helper
Tux's lil' helper
Posts: 109
Joined: Thu Jan 11, 2018 1:24 am

iptables: "Extension state is not supported"

  • Quote

Post by redblade7 » Mon May 01, 2023 9:15 pm

I ran iptables -L the other day and noticed that some of my rules using -m state suddenly give this warning message after the rule is listed:

"Warning: Extension state is not supported, missing kernel module?"

The state module (actually it's not a module but compiled in) was never disabled in the kernel, I enabled the "conntrack" USE flag too and its required CONFIG_NF_CT_NETLINK, and it's still showing this message. I'm not sure if the rules are working or not, and "-m state -h" shows the correct syntax of the state module.

Anyone know more?
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Thu May 04, 2023 2:12 pm

Plz see

https://wiki.gentoo.org/wiki/Iptables#Kernel

It is missing the state functionality.
Plz add it

Code: Select all

[*] Network packet filtering framework (Netfilter)  --->
            --- Network packet filtering framework (Netfilter)
            [ ]   Network packet filtering debugging
            [ ]   Advanced netfilter configuration
                  Core Netfilter Configuration  --->
                      <M> Netfilter LOG over NFNETLINK interface
                      <*> Netfilter connection tracking support
                      [ ]   Supply CT list in procfs (OBSOLETE)
                      < >   FTP protocol support
                      < >   IRC protocol support
                      < >   NetBIOS name service protocol support
                      < >   SIP protocol support
                      < >   Connection tracking netlink interface
                      < > Netfilter nf_tables support
                      -*- Netfilter Xtables support (required for ip_tables)
                            *** Xtables combined modules ***
                      < >   nfmark target and match support
                            *** Xtables targets ***
                      < >   LOG target support
                      < >   "NFLOG" target support
                      < >   "TCPMSS" target support
                            *** Xtables matches ***
                      <*>   "conntrack" connection tracking match support
                      < >   IPsec "policy" match support
                      <*>   "state" match support  ########HERE
recompile and reinstall kernel and modules.
:)
Top
redblade7
Tux's lil' helper
Tux's lil' helper
Posts: 109
Joined: Thu Jan 11, 2018 1:24 am

  • Quote

Post by redblade7 » Thu May 04, 2023 10:40 pm

It already is enabled in the kernel.
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Fri May 05, 2023 9:26 am

Do you have

Code: Select all

CONFIG_NETFILTER_XT_MATCH_STATE
in your .config?
Can you plz double check?
:)
Top
pietinger
Administrator
Administrator
Posts: 6639
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Fri May 05, 2023 12:11 pm

redblade7,

my suggestion is the same as I always say: Enable ALL netfilter modules as <M>odule in your kernel configuration (and enable also "Advanced netfilter configuration"). As soon as your firewall starts (independent if "iptables" or "nftables") all needed modules will be loaded automatically and you can see with "lsmod" which of them you really need. Afterwards you can disable all modules again which you dont need.


(see also here: https://wiki.gentoo.org/wiki/User:Pieti ... lim_kernel )


P.S.: Dont forget netfilter-modules for IPv6 ... ;-) (If you use it)
Top
r_pns
n00b
n00b
Posts: 33
Joined: Sun Jul 02, 2006 6:23 pm

  • Quote

Post by r_pns » Sat May 20, 2023 1:55 pm

Apparently, I've found the root cause for this issue (which I've faced too). I've set:

Code: Select all

CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
# CONFIG_NETFILTER_XT_MATCH_STATE is not set
And now, my configuration like

Code: Select all

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
works without a warning. According to the docs, the former module supersedes the latter one.
Top
redblade7
Tux's lil' helper
Tux's lil' helper
Posts: 109
Joined: Thu Jan 11, 2018 1:24 am

  • Quote

Post by redblade7 » Sun Jul 02, 2023 3:26 am

r_pns wrote:Apparently, I've found the root cause for this issue (which I've faced too). I've set:

Code: Select all

CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
# CONFIG_NETFILTER_XT_MATCH_STATE is not set
And now, my configuration like

Code: Select all

-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
works without a warning. According to the docs, the former module supersedes the latter one.
That works for me. Thank you!
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic