Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot copy libxt_ndpi.so to /lib/xtables/ and gives an error "cp: cannot create regular file '/lib/xtables/': Not a directory" #75

Open
usama2490 opened this issue Jul 17, 2019 · 8 comments

Comments

@usama2490
Copy link

Hi, i am working on some academic project in which i have to run this integrated (ndpi with netfilter) firewall in a Docker Container. i was facing so much issues while installing it on ubuntu:14.04 container and then i switched to ubuntu:18.04 and then install its kernal headers, comment out "nf_ct untracked" line in main.c as it gave an error while running "sudo NDPI path=.." comand. After then i compile it successfully and then run make install_modules command which also gave me an error of "SSL Certs" and i ignored that error as you said earlier in one of the answers. Now i am running "cp" commands and it cannot copy ndpi.so to /lib/xtables/. As also i have got no success in running "iptables -m ndpi --help". i think ndpi is not completely compiled but i have tried everything to make it work and run every command. kindly tell what i am missing and how to run it properly in a DOCKER CONTAINER ??

@rightkick
Copy link

rightkick commented Jul 19, 2019 via email

@usama2490
Copy link
Author

Hey thanks for the reply, i have compiled it successfully in a vm. but now i need to compile it in a DOCKER Container and i have installed all the dependencies and packages but still got no success. if it compiles successfully next step i am gonna do is to redirect the host traffic to a container and will implement that blocking rules in a container. But now, i am not able to implement any rules within a container and whenever i execute "iptables -m ndpi --help" it gives an error that seems ndpi is not completely integrates with netfilter.

"sudo iptables -m ndpi --help" shows
iptables v1.6.1: Couldn't load match `ndpi':No such file or directory

Try `iptables -h' or 'iptables --help' for more information.

@rightkick
Copy link

rightkick commented Jul 19, 2019 via email

@usama2490
Copy link
Author

I don't go to the writing of Dockerfile part yet. i thought i should first create ubuntu container and try to compile it manually as i did in a normal VM. i assumed that if i able to do this successfully then i will write the complete Docker file.

I have installed everything and fix every bug which came while compiling this module in a container but eventually ndpi is not working with net-filter properly and returns the error as mentioned above.

@mcooper-veea
Copy link

I don't go to the writing of Dockerfile part yet. i thought i should first create ubuntu container and try to compile it manually as i did in a normal VM. i assumed that if i able to do this successfully then i will write the complete Docker file.

I have installed everything and fix every bug which came while compiling this module in a container but eventually ndpi is not working with net-filter properly and returns the error as mentioned above.

I have been able to get ndpi-netfilter working inside an Ubuntu 18.04 container. I don't have a dockerfile yet - I just made manual changes inside the container, not got around to translating them. If you like, I can share the steps with you - let me know if this would be helpful to you, and I'll share it via a github gist.

@Blopm
Copy link

Blopm commented Aug 21, 2019

Hi mcooper-veea,
I'm trying to run ndpi on ubuntu 18.04, but I have some little problems.
Could you share your steps, if you haven't already?

@usamazaheer
Copy link

usama bhai plz provide me your email.i have some to discuss with you

@mmurtaznaqvi
Copy link

mmurtaznaqvi commented Mar 12, 2020

Directory of xtables is changed in ubuntu 18.04. Use this command now.
cp /usr/src/ndpi-netfilter/ipt/libxt_ndpi.so /usr/lib/x86_64-linux-gnu/xtables/
If this doesn't work install this package and retry above command.
sudo apt-get install -y xtables-addons-common

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants