@brada4 aah, I didn't know what auc
was, I thought you were talking about keeping config. I had thought that one should always reinstall packages because old ones might not be compatible.
What's weird is, as I got do_page_fault(): sending SIGSEGV to nft
, there was only one device connected to the router, and that one was not in the interface where opennds is installed. So opennds was not doing anything at all.
At the moment where the router rebooted, there was one authenticated user over opennds. Since the statistics got lost upon reboot, I can't tell if it was triggered by something related to opennds.
I have Omada EAP's with Omada controller, so the router doesn't know anything about roaming.
Here is nft list ruleset
root@OpenWrt-erx2:~# nft list ruleset
table inet fw4 {
ct helper amanda {
type "amanda" protocol udp
l3proto inet
}
ct helper RAS {
type "RAS" protocol udp
l3proto inet
}
ct helper Q.931 {
type "Q.931" protocol tcp
l3proto inet
}
ct helper irc {
type "irc" protocol tcp
l3proto ip
}
ct helper pptp {
type "pptp" protocol tcp
l3proto ip
}
ct helper sip {
type "sip" protocol udp
l3proto inet
}
ct helper snmp {
type "snmp" protocol udp
l3proto ip
}
ct helper tftp {
type "tftp" protocol udp
l3proto inet
}
chain input {
type filter hook input priority filter; policy accept;
iifname "lo" accept comment "!fw4: Accept traffic from loopback"
ct state established,related accept comment "!fw4: Allow inbound established and related flows"
tcp flags syn / fin,syn,rst,ack jump syn_flood comment "!fw4: Rate limit TCP syn packets"
meta nfproto ipv6 counter packets 1343 bytes 100886 accept comment "!fw4: IPv6 device drop"
iifname { "vpn", "wg_s2s_b", "br-lan.12", "br-lan.16" } jump input_lan comment "!fw4: Handle lan IPv4/IPv6 input traffic"
iifname "eth0" jump input_wan comment "!fw4: Handle wan IPv4/IPv6 input traffic"
iifname "br-lan.11" jump input_guests comment "!fw4: Handle guests IPv4/IPv6 input traffic"
iifname "br-lan.15" jump input_residents comment "!fw4: Handle residents IPv4/IPv6 input traffic"
}
chain forward {
type filter hook forward priority filter; policy drop;
ct state established,related accept comment "!fw4: Allow forwarded established and related flows"
meta nfproto ipv6 counter packets 0 bytes 0 drop comment "!fw4: IPv6 any zone drop"
iifname { "vpn", "wg_s2s_b", "br-lan.12", "br-lan.16" } jump forward_lan comment "!fw4: Handle lan IPv4/IPv6 forward traffic"
iifname "eth0" jump forward_wan comment "!fw4: Handle wan IPv4/IPv6 forward traffic"
iifname "br-lan.11" jump forward_guests comment "!fw4: Handle guests IPv4/IPv6 forward traffic"
iifname "br-lan.15" jump forward_residents comment "!fw4: Handle residents IPv4/IPv6 forward traffic"
jump handle_reject
}
chain output {
type filter hook output priority filter; policy accept;
oifname "lo" accept comment "!fw4: Accept traffic towards loopback"
ct state established,related accept comment "!fw4: Allow outbound established and related flows"
oifname { "vpn", "wg_s2s_b", "br-lan.12", "br-lan.16" } jump output_lan comment "!fw4: Handle lan IPv4/IPv6 output traffic"
oifname "eth0" jump output_wan comment "!fw4: Handle wan IPv4/IPv6 output traffic"
oifname "br-lan.11" jump output_guests comment "!fw4: Handle guests IPv4/IPv6 output traffic"
oifname "br-lan.15" jump output_residents comment "!fw4: Handle residents IPv4/IPv6 output traffic"
}
chain prerouting {
type filter hook prerouting priority filter; policy accept;
iifname { "vpn", "wg_s2s_b", "br-lan.12", "br-lan.16" } jump helper_lan comment "!fw4: Handle lan IPv4/IPv6 helper assignment"
iifname "br-lan.11" jump helper_guests comment "!fw4: Handle guests IPv4/IPv6 helper assignment"
iifname "br-lan.15" jump helper_residents comment "!fw4: Handle residents IPv4/IPv6 helper assignment"
}
chain handle_reject {
meta l4proto tcp reject with tcp reset comment "!fw4: Reject TCP traffic"
reject comment "!fw4: Reject any other traffic"
}
chain syn_flood {
limit rate 25/second burst 50 packets return comment "!fw4: Accept SYN packets below rate-limit"
drop comment "!fw4: Drop excess packets"
}
chain input_lan {
jump accept_from_lan
}
chain output_lan {
jump accept_to_lan
}
chain forward_lan {
jump accept_to_wan comment "!fw4: Accept lan to wan forwarding"
jump accept_to_lan
}
chain helper_lan {
udp dport 10080 ct helper set "amanda" comment "!fw4: Amanda backup and archiving proto"
udp dport 1719 ct helper set "RAS" comment "!fw4: RAS proto tracking"
tcp dport 1720 ct helper set "Q.931" comment "!fw4: Q.931 proto tracking"
meta nfproto ipv4 tcp dport 6667 ct helper set "irc" comment "!fw4: IRC DCC connection tracking"
meta nfproto ipv4 tcp dport 1723 ct helper set "pptp" comment "!fw4: PPTP VPN connection tracking"
udp dport 5060 ct helper set "sip" comment "!fw4: SIP VoIP connection tracking"
meta nfproto ipv4 udp dport 161 ct helper set "snmp" comment "!fw4: SNMP monitoring connection tracking"
udp dport 69 ct helper set "tftp" comment "!fw4: TFTP connection tracking"
}
chain accept_from_lan {
iifname { "vpn", "wg_s2s_b", "br-lan.12", "br-lan.16" } counter packets 1230 bytes 147407 accept comment "!fw4: accept lan IPv4/IPv6 traffic"
}
chain accept_to_lan {
oifname { "vpn", "wg_s2s_b", "br-lan.12", "br-lan.16" } counter packets 5303 bytes 448456 accept comment "!fw4: accept lan IPv4/IPv6 traffic"
}
chain input_wan {
meta nfproto ipv4 udp dport 68 counter packets 0 bytes 0 accept comment "!fw4: Allow-DHCP-Renew"
icmp type echo-request counter packets 0 bytes 0 accept comment "!fw4: Allow-Ping"
meta nfproto ipv4 meta l4proto igmp counter packets 211 bytes 7596 accept comment "!fw4: Allow-IGMP"
meta nfproto ipv6 udp dport 546 counter packets 0 bytes 0 accept comment "!fw4: Allow-DHCPv6"
ip6 saddr fe80::/10 icmpv6 type . icmpv6 code { mld-listener-query . no-route, mld-listener-report . no-route, mld-listener-done . no-route, mld2-listener-report . no-route } counter packets 0 bytes 0 accept comment "!fw4: Allow-MLD"
icmpv6 type { destination-unreachable, time-exceeded, echo-request, echo-reply, nd-router-solicit, nd-router-advert } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Input"
icmpv6 type . icmpv6 code { packet-too-big . no-route, parameter-problem . no-route, nd-neighbor-solicit . no-route, nd-neighbor-advert . no-route, parameter-problem . admin-prohibited } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Input"
meta nfproto ipv4 udp dport { 51820, 51821, 51822 } counter packets 0 bytes 0 accept comment "!fw4: allow wireguard"
jump reject_from_wan
}
chain output_wan {
jump accept_to_wan
}
chain forward_wan {
icmpv6 type { destination-unreachable, time-exceeded, echo-request, echo-reply } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Forward"
icmpv6 type . icmpv6 code { packet-too-big . no-route, parameter-problem . no-route, parameter-problem . admin-prohibited } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Forward"
meta l4proto esp counter packets 0 bytes 0 jump accept_to_lan comment "!fw4: Allow-IPSec-ESP"
udp dport 500 counter packets 0 bytes 0 jump accept_to_lan comment "!fw4: Allow-ISAKMP"
jump reject_to_wan
}
chain accept_to_wan {
meta nfproto ipv4 oifname "eth0" ct state invalid counter packets 123 bytes 5445 drop comment "!fw4: Prevent NAT leakage"
oifname "eth0" counter packets 7930 bytes 789511 accept comment "!fw4: accept wan IPv4/IPv6 traffic"
}
chain reject_from_wan {
iifname "eth0" counter packets 213 bytes 10549 jump handle_reject comment "!fw4: reject wan IPv4/IPv6 traffic"
}
chain reject_to_wan {
oifname "eth0" counter packets 0 bytes 0 jump handle_reject comment "!fw4: reject wan IPv4/IPv6 traffic"
}
chain input_guests {
counter packets 430 bytes 30693 accept comment "!opennds: users_to_router"
meta nfproto ipv4 tcp dport { 53, 67, 68 } counter packets 0 bytes 0 accept comment "!fw4: dhcp nds guests"
meta nfproto ipv4 udp dport { 53, 67, 68 } counter packets 0 bytes 0 accept comment "!fw4: dhcp nds guests"
jump reject_from_guests
}
chain output_guests {
jump accept_to_guests
}
chain forward_guests {
jump accept_to_wan comment "!fw4: Accept guests to wan forwarding"
jump reject_to_guests
}
chain helper_guests {
udp dport 10080 ct helper set "amanda" comment "!fw4: Amanda backup and archiving proto"
udp dport 1719 ct helper set "RAS" comment "!fw4: RAS proto tracking"
tcp dport 1720 ct helper set "Q.931" comment "!fw4: Q.931 proto tracking"
meta nfproto ipv4 tcp dport 6667 ct helper set "irc" comment "!fw4: IRC DCC connection tracking"
meta nfproto ipv4 tcp dport 1723 ct helper set "pptp" comment "!fw4: PPTP VPN connection tracking"
udp dport 5060 ct helper set "sip" comment "!fw4: SIP VoIP connection tracking"
meta nfproto ipv4 udp dport 161 ct helper set "snmp" comment "!fw4: SNMP monitoring connection tracking"
udp dport 69 ct helper set "tftp" comment "!fw4: TFTP connection tracking"
}
chain accept_to_guests {
oifname "br-lan.11" counter packets 6 bytes 1783 accept comment "!fw4: accept guests IPv4/IPv6 traffic"
}
chain reject_from_guests {
iifname "br-lan.11" counter packets 0 bytes 0 jump handle_reject comment "!fw4: reject guests IPv4/IPv6 traffic"
}
chain reject_to_guests {
oifname "br-lan.11" counter packets 0 bytes 0 jump handle_reject comment "!fw4: reject guests IPv4/IPv6 traffic"
}
chain input_residents {
tcp dport { 53, 67, 68 } counter packets 0 bytes 0 accept comment "!fw4: dhcp dns residents"
udp dport { 53, 67, 68 } counter packets 643 bytes 64163 accept comment "!fw4: dhcp dns residents"
jump reject_from_residents
}
chain output_residents {
jump accept_to_residents
}
chain forward_residents {
jump accept_to_wan comment "!fw4: Accept residents to wan forwarding"
jump reject_to_residents
}
chain helper_residents {
udp dport 10080 ct helper set "amanda" comment "!fw4: Amanda backup and archiving proto"
udp dport 1719 ct helper set "RAS" comment "!fw4: RAS proto tracking"
tcp dport 1720 ct helper set "Q.931" comment "!fw4: Q.931 proto tracking"
meta nfproto ipv4 tcp dport 6667 ct helper set "irc" comment "!fw4: IRC DCC connection tracking"
meta nfproto ipv4 tcp dport 1723 ct helper set "pptp" comment "!fw4: PPTP VPN connection tracking"
udp dport 5060 ct helper set "sip" comment "!fw4: SIP VoIP connection tracking"
meta nfproto ipv4 udp dport 161 ct helper set "snmp" comment "!fw4: SNMP monitoring connection tracking"
udp dport 69 ct helper set "tftp" comment "!fw4: TFTP connection tracking"
}
chain accept_to_residents {
oifname "br-lan.15" counter packets 71 bytes 23288 accept comment "!fw4: accept residents IPv4/IPv6 traffic"
}
chain reject_from_residents {
iifname "br-lan.15" counter packets 25 bytes 1500 jump handle_reject comment "!fw4: reject residents IPv4/IPv6 traffic"
}
chain reject_to_residents {
oifname "br-lan.15" counter packets 0 bytes 0 jump handle_reject comment "!fw4: reject residents IPv4/IPv6 traffic"
}
chain dstnat {
type nat hook prerouting priority dstnat; policy accept;
}
chain srcnat {
type nat hook postrouting priority srcnat; policy accept;
oifname "eth0" jump srcnat_wan comment "!fw4: Handle wan IPv4/IPv6 srcnat traffic"
}
chain srcnat_wan {
meta nfproto ipv4 masquerade comment "!fw4: Masquerade IPv4 wan traffic"
}
chain raw_prerouting {
type filter hook prerouting priority raw; policy accept;
}
chain raw_output {
type filter hook output priority raw; policy accept;
}
chain mangle_prerouting {
type filter hook prerouting priority mangle; policy accept;
}
chain mangle_postrouting {
type filter hook postrouting priority mangle; policy accept;
}
chain mangle_input {
type filter hook input priority mangle; policy accept;
}
chain mangle_output {
type route hook output priority mangle; policy accept;
}
chain mangle_forward {
type filter hook forward priority mangle; policy accept;
iifname "eth0" tcp flags syn tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 ingress MTU fixing"
oifname "eth0" tcp flags syn tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 egress MTU fixing"
}
}
table ip nds_filter {
flowtable ndsftOUT {
hook ingress priority -100
}
chain ndsINP {
type filter hook input priority -100; policy accept;
iifname "br-lan.11" counter packets 1043 bytes 89332 jump ndsRTR
}
chain ndsFWD {
type filter hook forward priority -100; policy accept;
iifname "br-lan.11" counter packets 157987 bytes 10432010 jump ndsNET
}
chain nds_ft_OUT {
meta l4proto { tcp, udp } flow add @ndsftOUT counter packets 859 bytes 116960
counter packets 157810 bytes 10397804 return
}
chain nds_allow_INP {
type filter hook input priority 100; policy accept;
iifname "br-lan.11" counter packets 1028 bytes 88111 accept comment "!opennds: allow input"
}
chain nds_allow_FWD {
type filter hook forward priority 100; policy accept;
iifname "br-lan.11" counter packets 157810 bytes 10397804 accept comment "!opennds: allow forward"
}
chain ndsNET {
ct state invalid counter packets 31 bytes 6441 drop
ip daddr 192.168.12.1 tcp dport 2050 counter packets 0 bytes 0 accept
meta mark & 0x00030000 == 0x00020000 counter packets 0 bytes 0 accept
meta mark & 0x00030000 == 0x00030000 counter packets 157810 bytes 10397804 goto ndsAUT
counter packets 146 bytes 27765 reject
}
chain ndsRTR {
icmp type echo-request limit rate 4/second counter packets 0 bytes 0 accept
icmp type echo-request counter packets 0 bytes 0 drop
ct state invalid counter packets 0 bytes 0 drop
tcp dport 2050 counter packets 510 bytes 49158 accept
udp dport 53 counter packets 485 bytes 33201 accept
udp dport 67 counter packets 10 bytes 3324 accept
tcp dport 22 counter packets 0 bytes 0 accept
tcp dport 443 counter packets 0 bytes 0 accept
tcp dport 53 counter packets 7 bytes 438 accept
udp dport 68 counter packets 0 bytes 0 accept
tcp dport 81 counter packets 16 bytes 1990 accept
counter packets 15 bytes 1221 reject
}
chain ndsAUT {
counter packets 157810 bytes 10397804 jump ndsULR
counter packets 157810 bytes 10397804 jump nds_ft_OUT
counter packets 157810 bytes 10397804 accept
counter packets 0 bytes 0 accept
}
chain ndsULR {
ip saddr 192.168.12.141 counter packets 157751 bytes 10374866 return
ip saddr 192.168.12.141 counter packets 0 bytes 0 drop
}
}
table ip nds_mangle {
flowtable ndsftINC {
hook ingress priority -100
devices = { eth0 }
}
chain ndsPRE {
type filter hook prerouting priority dstnat; policy accept;
iifname "br-lan.11" counter packets 159124 bytes 10541990 jump ndsTRU
iifname "br-lan.11" counter packets 159124 bytes 10541990 jump ndsOUT
}
chain ndsPOST {
type filter hook forward priority -100; policy accept;
oifname "br-lan.11" counter packets 96809 bytes 223441721 jump ndsINC
}
chain ndsINC {
ip daddr 192.168.12.141 counter packets 96254 bytes 222947333 meta mark set meta mark | 0x00030000
oifname "br-lan.11" counter packets 96809 bytes 223441721 jump ndsDLR
oifname "br-lan.11" counter packets 96809 bytes 223441721 jump nds_ft_INC
oifname "br-lan.11" counter packets 96809 bytes 223441721 jump nds_ft_INC
}
chain nds_ft_INC {
meta l4proto { tcp, udp } flow add @ndsftINC counter packets 109 bytes 62428
counter packets 193618 bytes 446883442 return
}
chain ndsTRU {
}
chain ndsDLR {
ip daddr 192.168.12.141 counter packets 96254 bytes 222947333 return
ip daddr 192.168.12.141 counter packets 0 bytes 0 drop
}
chain ndsOUT {
ip saddr 192.168.12.141 ether saddr f6:ed:e1:32:ef:56 counter packets 158251 bytes 10421561 meta mark set meta mark | 0x00030000
}
}
table ip nds_nat {
chain ndsPRE {
type nat hook prerouting priority dstnat; policy accept;
iifname "br-lan.11" counter packets 1215 bytes 192368 jump ndsOUT
}
chain ndsOUT {
ip daddr 192.168.12.1 tcp dport 80 counter packets 15 bytes 912 redirect to :2050
meta mark & 0x00030000 == 0x00020000 counter packets 0 bytes 0 return
meta mark & 0x00030000 == 0x00030000 counter packets 1001 bytes 150652 return
ip daddr 192.168.12.1 tcp dport 2050 counter packets 7 bytes 436 accept
tcp dport 80 counter packets 15 bytes 912 dnat to 192.168.12.1:2050
counter packets 177 bytes 39456 accept
}
}
root@OpenWrt-erx2:~#
Wow, while I'm writing this post now, I got do_page_fault for nft again!!!!