You are not logged in.

#1 2016-09-26 19:58:14

SlickBlackCadillac
Member
Registered: 2015-09-10
Posts: 15

[SOLVED] iptables LOG target missing.

I simply want to LOG dropped packets. It seems every walkthrough for doing just this requires a "-j LOG" and just assumes that that is available on your system.

Any iptables command I try to execute results in :

iptables: No chain/target/match by that name.

I've scoured the 'net and found that other people have this problem, but I cannot find a solution.

What can I do to enable logging so that the LOG target is available?

My kernel is 4.7.2-1-ARCH
iptables version is 1.6.0


Thanks smile

Last edited by SlickBlackCadillac (2016-09-28 03:29:34)

Offline

#2 2016-09-27 16:13:45

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] iptables LOG target missing.

Make sure you fully update your system, reboot and try again.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2016-09-27 17:01:24

SlickBlackCadillac
Member
Registered: 2015-09-10
Posts: 15

Re: [SOLVED] iptables LOG target missing.

I am not able to reboot at the moment but I found something that may just indicate you are right.

# uname -r 
4.7.2-1-ARCH

But I did at some before experiencing this problem run pacman -Syu and updated to a newer kernel but have not rebooted.

So running a simple modprobe will say:

# modprobe xt_LOG 
modprobe: FATAL: Module xt_LOG not found in directory /lib/modules/4.7.2-1-ARCH

The problem being that the folder /lib/modules/4.7.2-1-ARCH has been renamed to /lib/modules/4.7.4-1-ARCH 

!!!!!

So I will reboot when I am able and try again. Will report back if that works.

Thanks!!


Edit: copied wrong output

Last edited by SlickBlackCadillac (2016-09-27 17:30:29)

Offline

#4 2016-09-27 22:13:07

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] iptables LOG target missing.

If 'uname -r' and 'pacman -Q linux' show different versions it means you have updated your kernel and didn't reboot, that will cause problems like you describe.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-09-28 01:42:45

SlickBlackCadillac
Member
Registered: 2015-09-10
Posts: 15

Re: [SOLVED] iptables LOG target missing.

R00KIE

Thanks very much my friend. Rebooting did the trick. Probably a first time rebooting was the answer to a problem I had in Arch.

So what I suspected was right. After booting, I did an lsmod and xt_LOG was nowhere to be found. Ran an iptables command with -j LOG in it and it didn't complain! I ran an lsmod and guess what, xt_LOG popped up. So iptables was trying to modprobe it! Go figure!

Stupid solution to a stupid problem but it sure taught me a lot about how Arch/Linux works!

Thanks again smile

Last edited by SlickBlackCadillac (2016-09-28 01:43:15)

Offline

Board footer

Powered by FluxBB