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.
Check the module in the directory
/lib/modules
Here you will find a directory of your kernel version, if you find more than one directory and you do not know where to go, run command
Quote:
uname -r
Output will be your directory name, now open it. Now go to kernel/net/ipv4/netfilter
if you are using ipv6, open kernel/net/ipv6/netfilter
Here you can see the list of modules. Find the netfilter module name.ko file and enable it for kernel.
We do not need the module for netstat-nat
The error is
Quote:
Could not read info about connections from the kernel, make sure netfilter is enabled in kernel or by modules.
netfilter should be enabled in kernel or by modules
We need to enable the netfilter module in kernel to remove the error.
Enable the modules which are related to netfilter. We have to enable the module nf_nat or similar one.
Use modprobe. modprobe is a command (program) to add and remove modules from the Linux Kernel.
root@x301:/lib/modules/3.13.0-27-generic/kernel/net/ipv4/netfilter# ufw status
WARN: Duplicate profile 'Apache', using last found
WARN: Duplicate profile 'Apache Secure', using last found
WARN: Duplicate profile 'Apache Full', using last found
Status: inactive
root@x301:/lib/modules/3.13.0-27-generic/kernel/net/ipv4/netfilter# ufw enable
WARN: Duplicate profile 'Apache', using last found
WARN: Duplicate profile 'Apache Secure', using last found
WARN: Duplicate profile 'Apache Full', using last found
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@x301:/lib/modules/3.13.0-27-generic/kernel/net/ipv4/netfilter# ufw status
WARN: Duplicate profile 'Apache', using last found
WARN: Duplicate profile 'Apache Secure', using last found
WARN: Duplicate profile 'Apache Full', using last found
Status: active
root@x301:/lib/modules/3.13.0-27-generic/kernel/net/ipv4/netfilter# netstat-nat
Could not read info about connections from the kernel, make sure netfilter is enabled in kernel or by modules.
root@x301:/lib/modules/3.13.0-27-generic/kernel/net/ipv4/netfilter#
I ran into similar problem on ubuntu 14.04. After digging a bit I figured it's because /proc/net/ip_conntrack is removed (or say deprecated)
simply execute:
strace -f netstat-nat
there are two entries like:
open("/proc/net/nf_conntrack", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/proc/net/ip_conntrack", O_RDONLY) = -1 ENOENT (No such file or directory)
then comes the failure messages:
write(1, "Could not read info about connec"..., 111Could not read info about connections from the kernel, make sure netfilter is enabled in kernel or by modules.
) = 111
so it is obvious the netstat-nat in apt repository is still using the old proc file, which causes the problem on my server.
Using conntrack instead solves the problem. Hope it helps people who still are confused.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.