Linux built-in firewall iptables for Embedded System

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.