我在我的服务器上设置了一个无线接入点,出于某种原因,除了自动发现功能之外,一切都正常。我看不到任何其他设备,没有发现 upnp 设备,我认为这是我忽略的一个简单的 iptable 或路由问题。
例子:
- 插入以太网的设备 A 发现 20 个本地设备
- 插入无线的设备 A 发现了自己,并且只有 wifi
- 设备 A 插入无线网卡,如果手动指定 IP,则可以连接到其他设备
- 设备 A 看不到其他已连接的 UpNp/DLNA/Share/Etc 无线设备,但可以连接以太网
我很久以前就解决了这个问题,但不记得我做了什么。
sudo iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
路线
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.100.1 0.0.0.0 UG 0 0 0 eth0
default 192.168.100.1 0.0.0.0 UG 202 0 0 eth0
192.168.100.0 * 255.255.255.0 U 202 0 0 eth0
192.168.189.0 * 255.255.255.0 U 303 0 0 wlan0
配置文件
eth0 Link encap:Ethernet HWaddr b8:27:eb:31:1e:4b
inet addr:192.168.100.153 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: fe80::fb1:56b0:c113:f046/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281701 errors:0 dropped:0 overruns:0 frame:0
TX packets:89770 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:75550664 (72.0 MiB) TX bytes:19734709 (18.8 MiB)
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:2491 errors:0 dropped:0 overruns:0 frame:0
TX packets:2491 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:234335 (228.8 KiB) TX bytes:234335 (228.8 KiB)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:64:4b:1e
inet addr:192.168.189.1 Bcast:192.168.189.255 Mask:255.255.255.0
inet6 addr: fe80::f855:75b1:b821:5f5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26313 errors:0 dropped:24582 overruns:0 frame:0
TX packets:2436 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4191579 (3.9 MiB) TX bytes:966693 (944.0 KiB)
网络/接口
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
#auto eth0 # managed by ifplugd
iface eth0 inet dhcp
#hwaddress ether 1a:64:b6:bf:36:37
#allow-hotplug wlan0
#auto wlan0
#iface wlan0 inet dhcp
#pre-up wpa_supplicant -B w -D wext -i wlan0 -c /opt/max2play/wpa_supplicant.co$
#post-down killall -q wpa_supplicant
#Accesspoint start
up iptables-restore < /etc/hostapd/iptables.ap
#Accesspoint end
主办方
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 UnitThree
192.168.189.1 UnitThree
编辑:格式化
答案1
您可能将答案路由到了错误的接口。
ip route add 239.255.255.250 dev wlan0
应该可以奏效。
答案2
- 完整的多播路由变得更加棘手(在集线器时代就容易多了)。安装一个包可以让它变得更容易。
- WiFi 配置为不允许 WiFi 设备与另一个 WiFi 设备通信。