Linux下WiFi工具网络转发iptables交叉编译,及其支持iptables使用的内核配置

AP热点nat方式连接到网络,需要用到iptables这个工具来实现网卡的网络转发代理上网的功能,让我们网卡配置的AP热点实现上网功能。

1.iptables转发nat需要内核的支持,内核的配置:

[*] Networking support  --->

   Networking options  --->

      [*] Network packet filtering framework (Netfilter)  --->

           [*]   Advanced netfilter configuration (NEW)

               Core Netfilter Configuration  --->

         <*> Netfilter connection tracking support

         <*>   TFTP protocol support

         <*>   "connlimit" match support"

         <*>   "conntrack" connection tracking match support

         <*>   "mac" address match support

         <*>   "string" match support

         <*>   "time" match support

             <*> Netfilter Xtables support (required for ip_tables)

   <*>   IP virtual server support  --->

     [*]   Netfilter connection tracking

           IP: Netfilter Configuration  --->

         <*> IPv4 connection tracking support (required for NAT)

     [*]   proc/sysctl compatibility with old connection tracking (NEW)

     <*> IP tables support (required for filtering/masq/NAT)

        <*>   Packet filtering

        <*>     REJECT target support

        <*>   IPv4 NAT

        <*>     MASQUERADE target support

        <*>     NETMAP target support

        <*>     REDIRECT target support

2. iptables的交叉编译:

3.  echo 1 > /proc/sys/net/ipv4/ip_forward   (打开IP转发功能)

4. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  (以nat方式转发eth0网卡,这句执行成功就可以上网了)

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值