Closed lucdig closed 3 years ago
This is not a problem with SMCRoute. When you join a group wtth SMCRoute it only asks the kernel for the group. The kernel creates the IGMP frame that is sent on the (pseudo) wire. Wireguard forwards packets by matching its AllowedIPs
setting.
I tested by using a AllowedIPs = 0.0.0.0/0
on both ends of a wg1 tunnel, with multicast enabled like you did, and then IGMP packets are forwarded.
I don't know how your Ubuntu works, but I cannot set AllowedIPs = 0.0.0.0/0
on mine.
In fact, my Ubuntu sets as many routes via wg1 as many nets it finds in AllowedIP. So, if route to 0.0.0.0/0 is set to wg1, the system is totally unreachable via ssh/vnc/..., and I have to open a console.
Anyway, I resolved adding 224.0.0.0/4 in the list of allowed IPs: AllowedIPs = <internal-wg1-subnet>, 224.0.0.0/4
, and now I see the igmp join's flowing through wg1.
Everything works as I expected.
Thanks a lot, regards
So then we can close this, right?
Yes, sure. Thanks
The wg0 interface can send and receive multicast packets, but the eth0 interface cannot send or receive multicast packets. Both wg0 and eth0 have multicast functionality enabled.
Configuration: bash 复制代码 iptables -t mangle -A PREROUTING -i eth0 -d 239.255.255.250 -j TTL --ttl-inc 2 ip link set dev wg0 multicast on ip link set dev wg0 multicast on /etc/smcroute.conf: bash 复制代码 phyint eth0 enable phyint wg0 enable
mgroup from eth0 group 239.255.255.250 mroute from eth0 group 239.255.255.250 to wg0
mgroup from wg0 group 239.255.255.250 mroute from wg0 group 239.255.255.250 to eth0 Output from smcrouted -n: less 复制代码 smcroute[6339]: SMCRoute v2.5.6 smcroute[6339]: IPv4 multicast routing API already in use: Address already in use smcroute[6339]: /etc/smcroute.conf line 5: mroute: inbound eth0 is not a known phyint smcroute[6339]: /etc/smcroute.conf line 8: mroute: inbound wg0 is not a known phyint smcroute[6339]: Parse error in /etc/smcroute.conf smcroute[6339]: Ready, waiting for client request or kernel event.
@goldsoft8888 this is a closed issue. Please do not report new issues on closed ones. Also, when reporting a problem you need to state what you expected to happen and what did happen. Thank you
On Linux Ubuntu:
/etc/smcroute.conf:
With
smcroutectl join wg1 239.255.1.1
, I don't see any udp packet of the wireguards interface. Nothing appears with the commandtcpdump -n -i eth0 udp and port 444
(444 is the UDP port of the wg1 server)Am I missing anything? Thanks, regards