通过 hostapd 建立热点(使用 SIM 网络),站点可以连接但无法浏览

通过 hostapd 建立热点(使用 SIM 网络),站点可以连接但无法浏览

我已通过 hostapd 建立了一个使用 SIM 网络(通过数据呼叫)的热点,我可以从手机连接到网络,但无法浏览任何内容。我怀疑从站点请求的数据包没有得到正确服务,但我并不完全了解整个情况。

有趣的是,我可以从运行 hostapd 的 Linux shell ping google.com

以下是我设置 hostapd 的方法:

modprobe <wifi-driver.ko>
iw dev wlan0 set type __ap
ifconfig wlan0 up
brctl addif bridge0 wlan0
hostapd -dd hostapd.conf

还有一个后续问题:当wlan0没有添加到桥接器时,不会发生来自站点的连接。

输出ifconfig

bridge0   Link encap:Ethernet  HWaddr 0e:7d:2a:ce:86:e0  
          inet addr:192.168.225.1  Bcast:192.168.225.255  Mask:255.255.255.0
          inet6 addr: fe80::c7d:2aff:fece:86e0/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:933 errors:0 dropped:0 overruns:0 frame:0
          TX packets:549 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:288140 (281.3 KiB)  TX bytes:79139 (77.2 KiB)

eth0      Link encap:Ethernet  HWaddr 00:55:7b:b5:7d:f7  
          inet addr:169.254.4.1  Bcast:169.254.4.255  Mask:255.255.255.0
          inet6 addr: fe80::255:7bff:feb5:7df7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:963 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:303266 (296.1 KiB)
          Interrupt:75 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1840 (1.7 KiB)  TX bytes:1840 (1.7 KiB)

rmnet_data0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:25.24.48.170  Mask:255.255.255.252
          UP RUNNING  MTU:1460  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9480 (9.2 KiB)  TX bytes:20389 (19.9 KiB)

rmnet_data1 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:25.19.213.156  Mask:255.255.255.248
          UP RUNNING  MTU:1460  Metric:1
          RX packets:278 errors:0 dropped:0 overruns:0 frame:0
          TX packets:331 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:51353 (50.1 KiB)  TX bytes:151692 (148.1 KiB)

rmnet_ipa0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING  MTU:2000  Metric:1
          RX packets:209 errors:0 dropped:0 overruns:0 frame:0
          TX packets:379 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:62153 (60.6 KiB)  TX bytes:173597 (169.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:03:7f:61:a0:41  
          inet6 addr: fe80::203:7fff:fe61:a041/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:548 errors:0 dropped:9 overruns:0 carrier:0
          collisions:0 txqueuelen:3000 
          RX bytes:327093 (319.4 KiB)  TX bytes:87133 (85.0 KiB)

相关内容