<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      【原】iptables 交叉編譯

          防火墻在做數(shù)據(jù)包過濾決定時,有一套遵循和組成的規(guī)則,這些規(guī)則存儲在專用的數(shù)據(jù)包過濾表中,而這些表集成在 Linux 內(nèi)核中。在數(shù)據(jù)包過濾表中,規(guī)則被分組放在我們所謂的鏈(chain)中。而netfilter/iptables IP 數(shù)據(jù)包過濾系統(tǒng)是一款功能強大的工具,可用于添加、編輯和移除規(guī)則。
      雖然 netfilter/iptables IP 信息包過濾系統(tǒng)被稱為單個實體,但它實際上由兩個組件netfilter 和 iptables 組成。
      netfilter 組件也稱為內(nèi)核空間(kernelspace),是內(nèi)核的一部分,由一些信息包過濾表組成,這些表包含內(nèi)核用來控制信息包過濾處理的規(guī)則集。
      iptables 組件是一種工具,也稱為用戶空間(userspace),它使插入、修改和除去信息包過濾表中的規(guī)則變得容易。


      1、下載iptables
      https://git.netfilter.org/iptables/
      git clone git://git.netfilter.org/iptables


      2、進入下載包,執(zhí)行autogen.sh,得到configure文件。


      3、配置交叉編譯器
      ./configure --enable-static --disable-shared --prefix=$PWD/bin CC=/opt/Xilinx/pkg2018.2/petalinux/tools/linux-i386/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc --host=arm-none-linux-gnueabi
      說明:
      1)解析參考./configure --help
      2)/opt/Xilinx/pkg2018.2/petalinux/tools/linux-i386/aarch64-linux-gnu/bin/aarch64-linux-gnu-為編譯器路徑。
      3)--enable-static --disable-shared 指定靜態(tài)編譯。
      4)--prefix=$PWD/bin指定make install后的安裝目錄,這里設(shè)置為當(dāng)前目錄下的bin目錄。
      5)執(zhí)行時會出現(xiàn)下述錯誤,缺少libmnl。
          checking for libmnl... no
               *** Error: No suitable libmnl found. ***
              Please install the 'libmnl' package
              Or consider --disable-nftables to skip
              iptables-compat over nftables support.
      這里有說明,可以去掉 感覺這個和 NAT 也沒關(guān)系,就不裝了。
      6)完整命令: ./configure --enable-static --disable-shared --prefix=$PWD/bin CC=/opt/Xilinx/pkg2018.2/petalinux/tools/linux-i386/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc --host=arm-none-linux-gnueabi --disable-nftables


      4、編譯:make


      5、安裝:make install


      6、 編譯出來的文件在當(dāng)前路徑下的bin/sbin里:最終文件是xtables-legacy-multi,但是不能直接運行xtables-legacy-multi,必須建立軟連接或者重命名。否則出現(xiàn)以下異常信息:
            /bin # xtables-legacy-multi
            ERROR: No valid subcommand given.
            Valid subcommands:
            * iptables
            * main4
            * iptables-save
            * save4
            * iptables-restore
            * restore4
            * iptables-xml
            * xml
            * ip6tables
            * main6
            * ip6tables-save
            * save6
            * ip6tables-restore
            * restore6
            /bin #


      7、把xtables-legacy-multi上傳到設(shè)備上,并重名為iptables。

       

      8、查看nat表
      iptables -t nat -L

      提示:iptables v1.8.3 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)

      Perhaps iptables or your kernel needs to be upgraded.

      解決方法: 編譯內(nèi)核時加入以下模塊

      Linux Kernel Configuration
          -> Networking support
              -> Networking options
                  -> Network packet filtering framework(netfilter)
                      -> Core netfilter configuration
                          -> Netfilter connection tracking support
                          -> NetBIOS name service protocal support
                          -> Netfilter Xtables support (required for ip_tables)


      Linux Kernel Configuration
          -> Networking support
              -> Networking options
                  -> Network packet filtering framework(netfilter)
                      -> IP: Netfilter Configuration
                          -> IPv4 connection tracking support (require for NAT) 
                          -> IPv4 NAT
                          -> IP tables support (required for filtering/masq/NAT)
                          -> iptables NAT support
                          -> raw table support (required for NOTRACK/TRACE)

      參考:
      1、https://blog.csdn.net/dean_gdp/article/details/25879081
      2、http://www.rzrgm.cn/ningci/p/6834640.html

      3、https://blog.csdn.net/seven407/article/details/7667421

       

      posted @ 2019-10-16 16:23  菜鳥升級  閱讀(8196)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 99久久免费精品国产色| 深夜免费av在线观看| 成人AV专区精品无码国产| 亚洲综合av一区二区三区| 日本欧美大码a在线观看| 激情综合网激情综合| 亚洲欧美日韩一区在线观看| 亚洲综合久久精品哦夜夜嗨| 中文字幕无码av不卡一区| 一区二区三区岛国av毛片 | 国产欧美另类久久久精品不卡 | 亚洲国产美女精品久久久| 亚洲精品一区久久久久一品av | 浮妇高潮喷白浆视频| 精品国产中文字幕在线看| 午夜通通国产精品福利| 久久午夜色播影院| 国产麻豆一区二区精彩视频| 无码AV中文字幕久久专区| 久久se精品一区精品二区国产| 中文毛片无遮挡高潮免费| 99国产精品永久免费视频| 熟女系列丰满熟妇AV| 少妇高潮激情一区二区三| 老司机精品影院一区二区三区| 亚洲AV无码破坏版在线观看| 久久www免费人成一看片| 熟女系列丰满熟妇AV| 国产情侣激情在线对白| 好爽好紧好大的免费视频| 色一伊人区二区亚洲最大| 国产成人小视频| 最新精品国偷自产在线美女足| 最新中文字幕国产精品| 欧美乱妇高清无乱码免费| 丰满人妻无码∧v区视频 | 国产福利酱国产一区二区| 精品国产成人国产在线观看| 午夜福利院一区二区三区| 色欲AV无码一区二区人妻| 开心五月激情五月俺亚洲|