4

I've found some rules but most are inconclusive. Chromecast uses DIAL and discovers via multicast from what I've understood..

I have an Ethernet-connected computer which I would like to route via my home brew AP (Linux, iptables, DNS, etc.) to the Wi-Fi subnet of 192.168.1.0.

Is this possible and what would a rule look like? I really haven't gotten far with this yet, but this is what I thought would do the trick:

iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -A FORWARD -i enp2s0 -s 10.8.0.5 -o wlp3s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A POSTROUTING -s 192.168.1.0/24 -o enp2s0 -j MASQUERADE
iptables -A POSTROUTING -s 10.8.0.5/24 -o wlp3s0 -j MASQUERADE

I've got similar rules for shuffling regular traffic from the Wi-Fi to the Internet from and thought this adaption would do the trick... But nothing so far :/

There are some devious computers on the 10.8.X network, and I'd prefer only to allow the multicast traffic + screen sharing things between 10.8.0.5 and the Wi-Fi segment (the entire Wi-Fi segment is fine).

drs
  • 5,363
  • 9
  • 40
  • 69
Torxed
  • 3,567
  • 7
  • 27
  • 44

1 Answers1

1

For multicast across network interfaces, I'd suggest trying https://github.com/alsmith/multicast-relay. I'm using it on my own homebrew router (Banana Pi R2) with Debian, and it works like a commercially available router would (assuming everything is on the same subnet).

I'd assume that you could block unwanted IP addresses using iptables...

  • Answers that just mention pieces of software are not highly regarded on Stack Exchange.  We prefer answers that identify useful software *and explain how to use it to solve the OP’s question.* – G-Man Says 'Reinstate Monica' Apr 04 '22 at 10:16