Why is the 'iptables' target 'NFLOG" not sending log messages to the Kernel?
2
votes
0
answers
276
views
I recently started using an old cell phone, Samsung Galaxy J7 model SM-J700M. I rooted it, flashed LineageOS and installed a SIM card and it works just fine. I decided to work on a script with iptables rules, run it and noticed there are a few problems. The 'iptables' target 'LOG' gives an error message when used, then I use 'NFLOG' but it doesn't send any log messages to the kernel when packets traverse it. I thought maybe some modules are not loaded.
I used the command 'lsmod':
j7elte:/ # lsmod
lsmod: No file /proc/modules: No such file or directory
1|j7elte:/ #
Then I played around with 'modprobe':
j7elte:/ # modprobe -a
modprobe: No file /proc/modules: No such file or directory
1|j7elte:/ #
What I can tell is, that the kernel is missing a whole lot of things. I was never good with the Android or the kernel.
How can I get the 'iptables' target 'NFLOG' to send messages to the kernel so that they appear after using 'dmesg' or 'adb logcat'?
Here is a snippit of 'logcat':
02-14 01:17:00.937 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:00.937 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:01.242 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:01.251 5245 5245 W sh : type=1400 audit(0.0:906): avc: denied { read } for name="mediaserver" dev="mmcblk0p20" ino=704 scontext=u:r:shell:s0 tcontext=u:object_r:mediaserver_exec:s0 tclass=file permissive=0
02-14 01:17:01.251 5245 5245 W sh : type=1300 audit(0.0:906): arch=40000028 syscall=334 per=8 success=no exit=-13 a0=ffffff9c a1=e7723060 a2=4 a3=0 items=0 ppid=2437 auid=4294967295 uid=2000 gid=2000 euid=2000 suid=2000 fsuid=2000 egid=2000 sgid=2000 fsgid=2000 ses=4294967295 tty=(none) exe="/system/bin/sh" subj=u:r:shell:s0 key=(null)
02-14 01:17:01.251 2298 2298 W auditd : type=1327 audit(0.0:906): proctitle=2F73797374656D2F62696E2F7368002D63006578706F727420414E44524F49445F4C4F475F544147533D222727223B2065786563206C6F67636174
02-14 01:17:01.251 2298 2298 W auditd : type=1320 audit(0.0:906):
02-14 01:17:01.291 5245 5245 W logcat : type=1400 audit(0.0:907): avc: denied { read } for name="mediaserver" dev="mmcblk0p20" ino=704 scontext=u:r:shell:s0 tcontext=u:object_r:mediaserver_exec:s0 tclass=file permissive=0
02-14 01:17:01.291 5245 5245 W logcat : type=1300 audit(0.0:907): arch=40000028 syscall=334 per=8 success=no exit=-13 a0=ffffff9c a1=f77230a0 a2=4 a3=0 items=0 ppid=2437 auid=4294967295 uid=2000 gid=2000 euid=2000 suid=2000 fsuid=2000 egid=2000 sgid=2000 fsgid=2000 ses=4294967295 tty=(none) exe="/system/bin/logcat" subj=u:r:shell:s0 key=(null)
02-14 01:17:01.938 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:01.938 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:02.244 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:02.939 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:02.940 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:03.247 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:03.941 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:03.941 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:04.249 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:04.291 2400 2400 W health@2.0-serv: type=1400 audit(0.0:908): avc: denied { read } for name="type" dev="sysfs" ino=12556 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
02-14 01:17:04.291 2400 2400 W health@2.0-serv: type=1300 audit(0.0:908): arch=40000028 syscall=322 per=8 success=no exit=-13 a0=ffffff9c a1=f6b11360 a2=a8000 a3=0 items=0 ppid=1 auid=4294967295 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=4294967295 tty=(none) exe="/system/vendor/bin/hw/android.hardware.health@2.0-service" subj=u:r:hal_health_default:s0 key=(null)
02-14 01:17:04.291 2298 2298 W auditd : type=1327 audit(0.0:908): proctitle="/vendor/bin/hw/android.hardware.health@2.0-service"
02-14 01:17:04.291 2298 2298 W auditd : type=1320 audit(0.0:908):
02-14 01:17:04.324 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:04.325 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:04.650 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:04.941 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:04.942 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:05.252 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:05.944 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:05.944 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:06.254 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:06.944 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:06.945 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:07.256 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:07.945 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:07.945 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:08.259 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:08.947 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:08.947 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:09.261 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:09.948 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:09.948 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:10.264 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:10.966 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:10.966 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
02-14 01:17:11.266 2417 4576 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
02-14 01:17:11.967 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] first frame after HWC_2_GLES
02-14 01:17:11.967 2417 2417 I display : [PrimaryDisplay] [DYNAMIC_RECOMP] GLES_2_HWC by high FPS(5)
Asked by Joel Vázquez
(21 rep)
Nov 24, 2022, 09:12 PM
Last activity: Nov 25, 2022, 04:18 AM
Last activity: Nov 25, 2022, 04:18 AM