afwall
afwall copied to clipboard
AFWall+ Log does not work on kernels without CONFIG_NETFILTER_XT_TARGET_LOG
Describe the bug Logging prevents rules from being applied for some kernels symptom: toaster: “Error applying iptables rules” Pixel 3, Android 12: works Pixel 6, Android 12: does not work It seems all Androids have NFLOG but newer Androids do not have LOG the LOG target is not available, which can be checked:
zcat /proc/config.gz | grep CONFIG_NETFILTER_XT_TARGET_LOG
# CONFIG_NETFILTER_XT_TARGET_LOG is not set
zcat /proc/config.gz | grep CONFIG_NETFILTER_XT_TARGET_NFLOG
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
iptables --new-chain X
iptables --append X --jump NFLOG
# OK
iptables --append X --jump LOG
iptables v1.8.7 (legacy): Couldn't find target `LOG'
Try `iptables -h' or 'iptables --help' for more information.
IMPACT: AFWall+ Log function cannot be used on devices that do not have the iptables LOG target
Firewall Logs N/A version: 3.6dev+
Smartphone (please complete the following information): Pixel 3/6
Additional context it is unclear how NFLOG can be directed to logcat on Android