Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi, found an article online that use Trace to debug iptables. I try installing but it will give the error below. Wondering if anyone get this too and how do we solve them? Am using root on Ubuntu 20.04 LTS
Code:
echo ipt_LOG >/proc/sys/net/netfilter/nf_log/2
-bash: echo: write error: No such file or directory
I guess that the number is your interface number. On my system, /proc/sys/net/netfilter/nf_log contains files 0, 1, 2, ..., though these numbers have nothing to do with the indices displayed by the ip link command.
Thus, my next guess is that you have two interfaces, loopback and your main interface, and therefore /proc/sys/net/netfilter/nf_log only contains files 0 and 1.
Totally wrong.
The numbers are protocol numbers.
Try modprobing something else, such as nf_log_ipv4.
What do you get from
Code:
ls /proc/sys/net/netfilter/nf_log
cat /proc/net/netfilter/nf_log
?
hi, im testing this on a Pi running Ubuntu 20.04 64bit. its default user is Ubuntu and I change to root(sudo su) since it say permission denied for user Ubuntu.
When i try run this-
Code:
modprobe nf_log_ipv4
echo nf_log_ipv4 >/proc/sys/net/netfilter/nf_log_ipv4/2
bash: /proc/sys/net/netfilter/nf_log_ipv4/2: No such file or directory
am i doing something wrong? please suggest some way to test, or further reading on this as like to learn howto debug iptables. as this is a very important thing to learn in linux. recently spend so many hours tinker here and there just bcoz of one iptables rule. would be great if we can look into what happens in the back like where is the blockage and figure out how to let them pass thru or something like that
Sorry, iptables tracing is something I want to try but I have no experience so far. I was just curious about your original question (and totally missed the incorrect directory that you used).
Sorry, iptables tracing is something I want to try but I have no experience so far. I was just curious about your original question (and totally missed the incorrect directory that you used).
No worry pal, you have help so much. at least i could run them now. thanks alot
and do you know if we need to cleanup(the modprobe, echo nf thingy) after using? if yes, how?
and do you know if we need to cleanup(the modprobe, echo nf thingy) after using? if yes, how?
It's the opposite. Once you reboot, the tracing is gone. If you need it to be permanent, you have to add the kernel module to a file like /etc/modules (the precise method depends on your distro).
Quote:
p/s - u hv any suggest reading for this topic?
This seems to be sparsely documented. I would start at netfilter.org and perhaps use their mailing list, both to see if there are discussions around that subject and to ask questions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.