1,
Iptables uses the kernel framework provided by Netfilter to establish a policy. To start iptalbes, you must first start Netfilter in the kernel:
Make menuconfig-> networking support-> networking option-> network packet filtering framework
First, you must start the network packet filtering framework and then configure the specific functions.
Iptables is like a user space interface. The specific work is actually completed by the netfilter of the kernel space.
2,
The next step is to port an iptables.
The latest version 1.4.17 is selected ,:
Ftp://ftp.netfilter.org/pub/iptables/
Cross-Compilation:
.. /Iptables-1.4.17/configure -- prefix =/home/rebi/cross_tools/build_iptables-1.4.17/_ install -- Host = arm-unknown-Linux-gnueabi ldflags =-L/home/rebi/cross_tools/build_iptables-1.4.17 /libiptc /. libs
Note that ldflags =-L/home/rebi/cross_tools/build_iptables-1.4.17/libiptc /. libs is found to make when there is a libip6tc library not found, but by searching this library on/home/rebi/cross_tools/build_iptables-1.4.17/libiptc /. in the libs path, I manually add it.
This problem occurs here, I guess, because I did not directly compile it in the source directory but configure and make in another directory build_iptables-1.4.17. Many software support this method because it is simple and can delete and retry all directories directly after an error without affecting the directory where the source code is located. However, some software does not support this method, such as samba.
Make & make install
Successful.