Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
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.
I am trying to port netfilter on my embedded linux target board.
Target board has linux kernel 2.6.x I started with iptables tutorial.
Also,I extracted the iptables source code on my nfs root file system
But, I don't know how to build and install this iptables for my target board.
whenever I try to "make" and "insall" on my host, it always changes my host iptables not my target.
How can I build this iptables feature on my host for my target.
and which files should be copy(?) or install(?) into my target nfs file system.
--- This article is post on "linux network directory" too.
I don't know how to delete this post on linux-network.
so, I post this twice on linux-embedded and linux-network
If you let me know how to remove the article,I'll do that.
Sorry again.
If your embedded root system is shared out via nfs then you need to modify your configure command to point into that directory instead of the directory on your host. A configure --prefix=<path to nfs share> should do the trick. That way you will get it installed into the correct place. However since you mention embedded linux I would suspect your embedded system is not the same architecture as your main computer, thus even if you get it to the right place it may not work. This is why the poster above asked about your build environment, since most embedded stuff is done with a build system.
I could change the cross-compiler for my target system.
I have similar experience to porting some application like "ethool", "tcpdump" and so on.
But, most embedded targe application is needed by only one binary or one library file.
For example, if I should use "ethtool" on my target system, I just copy only one binary file "ethtool"
that I compiled by cross-compiler.
However, this "iptables" ....
After finishing compile using "make" with cross-compiler , I don't know which file to copy on target system.
I didn't see any binary and library...named "iptables" after "make"
"iptables" is different with "ethtool" or "tcpdump" ...
That is my question.
Sorry for my stupid english skill, But I want to use "iptables" feature on my target system.
Just now I try to do the same thing like chxooi and I also ran into similar problems.
Quote:
./iptables-multi: error while loading shared libraries: libip4tc.so.0: cannot op
en shared object file: No such file or directory
Here you have to point with a link to libip4tc.so.0.0.0, the same goes to libxtables.so and libxtables.so.5 to libxtables.so.5.0.0:
Code:
ln -s libip4tc.so.0.0.0 libip4tc.so.0
-----------------------------------------------------------------
Now I have a problem:
Code:
# iptables -t mangle -A PREROUTING -s localhost -j TEE --gateway 192.168.200.5
iptables: No chain/target/match by that name.
but...
Code:
# iptables -t mangle -A PREROUTING -s localhost -j TEE
iptables v1.4.9.1: TEE target: --gateway parameter required
Try `iptables -h' or 'iptables --help' for more information.
# iptables -t mangle -A PREROUTING -s localhost -j TEE --gateway
iptables v1.4.9.1: option `--gateway' requires an argument
Try `iptables -h' or 'iptables --help' for more information.
# lsmod
Module Size Used by Not tainted
iptable_mangle 2352 1
iptable_filter 2336 0
What I've done so far:
I have an embedded Linux board (2.6.20.11) running iptables V1.3.8 with one MASQUARADE Rule in filter table OUTPUT but in addition I need the TEE Target, so I compiled iptables V1.4.9.1 and installed it in a separate folder. Running iptables from it showed, that iptables miss the module iptable_mangle.
So I compiled the kernel module iptable_mangle with #make modules, moved it to my board and loaded into the kernel with #insmod.
And here I am...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.