Problem with state match for ip6tables
Hello
I'm trying to set up a firewalling script for IPv6 on my Debian, kernel 2.6.15-1-686-smp, but i have a problem when using the state match.
When i try simply to match all packets with a state ESTABLISHED, i got the followinf error
root@trunks:~/firewalling/iptables
% ip6tables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
ip6tables: Unknown error 4294967295
I'm using ip6tables version 1.3.5, i tried also to retrieve the svn version, but i got the same behaviour.
I didn't see any patch to apply, and am clueless now. Am i missing something ? Is it a bug ?
Thanks a lot
Fred
Quoted 3 lines · Frederic Beck
root@trunks:~/firewalling/iptables
% ip6tables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
ip6tables: Unknown error 4294967295
I see the same problem with gentoo kernel 2.6.15-r2 and iptables 1.3.5, except that I also add the protocol
# ip6tables -I INPUT 1 -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT ip6tables: Unknown error 4294967295
strace shows this prior to the error
socket(PF_INET6, SOCK_RAW, IPPROTO_RAW) = 3
getsockopt(3, SOL_IPV6, 0x40 /* IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [84]) = 0 getsockopt(3, SOL_IPV6, 0x41 /* IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [2328]) = 0 setsockopt(3, SOL_IPV6, 0x40 /* IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2620) = -1 ENOENT (No such file or directory) write(2, "ip6tables: Unknown error 4294967"..., 36ip6tables: Unknown error 4294967295
) = 36
I have connection tracking turned on in the kernel
CONFIG_NETFILTER_NETLINK=yCONFIG_NETFILTER_NETLINK_QUEUE=yCONFIG_NETFILTER_NETLINK_LOG=yCONFIG_NF_CONNTRACK=y
# CONFIG_NF_CT_ACCT is not set
# CONFIG_NF_CONNTRACK_MARK is not setCONFIG_NF_CONNTRACK_EVENTS=y
# CONFIG_NF_CT_PROTO_SCTP is not set
# CONFIG_NF_CONNTRACK_FTP is not set
CONFIG_NF_CONNTRACK_IPV6=y
# CONFIG_IP6_NF_QUEUE is not setCONFIG_IP6_NF_IPTABLES=yCONFIG_IP6_NF_MATCH_LIMIT=yCONFIG_IP6_NF_MATCH_MAC=yCONFIG_IP6_NF_MATCH_RT=yCONFIG_IP6_NF_MATCH_OPTS=yCONFIG_IP6_NF_MATCH_FRAG=yCONFIG_IP6_NF_MATCH_HL=yCONFIG_IP6_NF_MATCH_MULTIPORT=yCONFIG_IP6_NF_MATCH_OWNER=yCONFIG_IP6_NF_MATCH_MARK=yCONFIG_IP6_NF_MATCH_IPV6HEADER=yCONFIG_IP6_NF_MATCH_AHESP=yCONFIG_IP6_NF_MATCH_LENGTH=yCONFIG_IP6_NF_MATCH_EUI64=yCONFIG_IP6_NF_FILTER=yCONFIG_IP6_NF_TARGET_LOG=yCONFIG_IP6_NF_TARGET_REJECT=yCONFIG_IP6_NF_TARGET_NFQUEUE=yCONFIG_IP6_NF_MANGLE=yCONFIG_IP6_NF_TARGET_MARK=yCONFIG_IP6_NF_TARGET_HL=yCONFIG_IP6_NF_RAW=y
Quoted 12 lines
Quoted 3 lines
root@trunks:~/firewalling/iptables
% ip6tables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
ip6tables: Unknown error 4294967295I see the same problem with gentoo kernel 2.6.15-r2 and iptables 1.3.5, except that I also add the protocol
# ip6tables -I INPUT 1 -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT ip6tables: Unknown error 4294967295strace shows this prior to the error
Quoted 9 lines
socket(PF_INET6, SOCK_RAW, IPPROTO_RAW)= 3
getsockopt(3,SOL_IPV6,0x40/*IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [84]) = 0 getsockopt(3,SOL_IPV6,0x41/*IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [2328]) = 0 setsockopt(3,SOL_IPV6,0x40/*IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2620) = -1 ENOENT (No such file or directory)write(2, "ip6tables: Unknown error 4294967"..., 36ip6tables: Unknown error 4294967295 )= 36
I tried on several distributions (debian, fedora) and kernel versions (2.6.14, 2.6.8), but i get each time the same error.
Is this a known bug ? I couldn't find it in netfilter's bugzilla
Fred
Hi, all,
From: Frederic Beck <[email protected]>
Date: Fri, 10 Feb 2006 14:56:31 +0100
Quoted 22 lines
Quoted 12 lines
Quoted 3 lines
root@trunks:~/firewalling/iptables
% ip6tables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
ip6tables: Unknown error 4294967295I see the same problem with gentoo kernel 2.6.15-r2 and iptables 1.3.5, except that I also add the protocol
# ip6tables -I INPUT 1 -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT ip6tables: Unknown error 4294967295strace shows this prior to the error
Quoted 9 lines
socket(PF_INET6, SOCK_RAW, IPPROTO_RAW)= 3
getsockopt(3,SOL_IPV6,0x40/*IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [84]) = 0 getsockopt(3,SOL_IPV6,0x41/*IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [2328]) = 0 setsockopt(3,SOL_IPV6,0x40/*IPV6_??? */, "filter\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2620) = -1 ENOENT (No such file or directory)write(2, "ip6tables: Unknown error 4294967"..., 36ip6tables: Unknown error 4294967295 )= 36
Quoted 4 lines
I tried on several distributions (debian, fedora) and kernel versions (2.6.14, 2.6.8), but i get each time the same error.
Is this a known bug ? I couldn't find it in netfilter's bugzilla
The only kernel >= 2.6.15 supports IPv6 state match. And kernel option CONFIG_NETFILTER_XTABLES and CONFIG_NETFILTER_XT_MATCH_STATE are required.
Please "make menuconfig" in kernel source, and go to the menu "Network packet filtering (replaces ipchains)", enable "Netfilter Xtables support (required for ip_tables)", enable "state match support".
Regards,
-- Yasuyuki Kozakai
Quoted 8 lines · Yasuyuki KOZAKAI
The only kernel >= 2.6.15 supports IPv6 state match. And kernel option
CONFIG_NETFILTER_XTABLESandCONFIG_NETFILTER_XT_MATCH_STATEare required.Please "make menuconfig" in kernel source, and go to the menu "Network packet filtering (replaces ipchains)", enable "Netfilter Xtables support (required for
ip_tables)", enable "state match support".
I am using kernel 2.6.15 but I do not see these config options anywhere. I have grep'd the kernel source and can find CONFIG_IP_NF_MATCH_STATE (which is only used in the ipv4 makefile to build ipt_state.o)
Quoted 4 lines · Graham Murray
I am using kernel 2.6.15 but I do not see these config options anywhere. I have grep'd the kernel source and can find
CONFIG_IP_NF_MATCH_STATE(which is only used in the ipv4 makefile to build ipt_state.o)
Also connection tracking for ipv6 is working as I see ipv6 sessions in /proc/net/nf_conntrack
From: Graham Murray <[email protected]>
Date: Mon, 13 Feb 2006 09:21:26 +0000
Quoted 11 lines
Quoted 8 lines · Yasuyuki KOZAKAI
The only kernel >= 2.6.15 supports IPv6 state match. And kernel option
CONFIG_NETFILTER_XTABLESandCONFIG_NETFILTER_XT_MATCH_STATEare required.Please "make menuconfig" in kernel source, and go to the menu "Network packet filtering (replaces ipchains)", enable "Netfilter Xtables support (required for
ip_tables)", enable "state match support".
Quoted 4 lines
I am using kernel 2.6.15 but I do not see these config options anywhere. I have grep'd the kernel source and can find
CONFIG_IP_NF_MATCH_STATE(which is only used in the ipv4 makefile to build ipt_state.o)
Sorry, I was wrong. nf_conntrack lives in kernel >= 2.6.15, but only kernel >= 2.6.16 supports IPv6 state match.
-- Yasuyuki Kozakai
Quoted 2 lines · Yasuyuki KOZAKAI
Sorry, I was wrong.
nf_conntracklives in kernel >= 2.6.15, but only kernel >= 2.6.16 supports IPv6 state match.
Thanks. I thought it was in 2.6.15, that is why I asked.
Quoted 2 lines
Sorry, I was wrong.
nf_conntracklives in kernel >= 2.6.15, but only kernel >= 2.6.16 supports IPv6 state match.
Ok great, i'll wait for that version to become stable and play with it !
Thanks
Fred