小编mac*_*akp的帖子

如何将 NAT iptables 规则用于 hostapd

我的电脑配备了两个网络接口,wlan0& eth0,我想使用 WiFi 端口作为wlan0.

  • 我使用了hostapd设施,它在本地网络内的路由模式下正常工作;用户可以连接到接入点并且 DHCP 在两个网段中都正常工作。
  • PChostapd没有任何防火墙或iptables规则(iptables并禁用防火墙),因为我只想使用 ADSL 路由器的内置防火墙。

我的网络配置如下:

  • PC with hostapd -> cable connection -> ADSL router
  • wlan0 -> eth0 <-> 192.168.0.1 <-> internet
  • 192.168.10.1 -> 192.168.0.7 -> static routing to 192.168.10.X

电脑ifconfig

eth0  Link encap:Ethernet  HWaddr 00:12:3F:F2:31:65
      inet addr:192.168.0.7  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::212:3fff:fef2:3165/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2169539 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1008097 errors:0 dropped:0 …
Run Code Online (Sandbox Code Playgroud)

linux nat iptables hostapd

9
推荐指数
2
解决办法
2万
查看次数

标签 统计

hostapd ×1

iptables ×1

linux ×1

nat ×1