Search code examples
networkingmulticastpptp

Receive specific multicast message on a client connected over VPN


Case: [ Subnet A , 192.168.2.0/24, Padavan firmware based internet gw ]

[ Subnet B , 192.168.1.0/24, Padavan firmware based internet gw ]

Host from subnet A (2.155) is connected via VPN (possible options: PPTP, OpenVPN, L2TP w/o ipsec) to subnet B, and receives address, saying 1.245/32

In subnet B exists host (1.10/32) which sends multicast datagramms to 224.0.0.50:9898 ; On router I see them with

tcpdump -i br0 -c 10 dst host 224.0.0.50 and port 9898 and multicast

13:46:54.345369 IP 192.168.1.10.4321 > 224.0.0.50.9898: UDP, length 135

I am looking for solutions, to receive/forward those broadcast messages, so they could be seen by hosts, connected via VPN

On router B, which is Padavan firmware based, I have, and limited to udpxy, igmproxy utilities, if needed.

On client host, I am debian based, and generally not limited in tools.

Datagrams are proprietary protocol, i.e. not a iptv or video stream.

Any ideas are welcomed.

[UPD] Additional info - per discussion in comments

That's a very specific hardware device, which is not very chatty in ethernet terms (saying max 1-2 datagramms in 5 seconds), thus for sure should be pretty forwardable. Unfortunately, It sends status updates purely via broadcasting. in Subnet A do exist similar device + control software. Thus I am looking for a way datagramms broadcasted to 224.0.0.50:9898 in subnet B to re-appear in subnet A. May be with help of some tool. May be smcroute, may be udpxy, maybe igmproxy


Solution

  • As I don't like to leave resolved questions unanswered, here is currently working solution

    In subnet B I have installed openVPN server endpoint, configured as L2.

    In subnet A, on a control host I have installed openvpn client, that connects to subnet B, assigned interface is tapz

    20: tapz: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100
        link/ether 0a:da:be:96:78:d9 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.245/24 brd 192.168.1.255 scope global noprefixroute tapz
           valid_lft forever preferred_lft forever
        inet6 fe80::8da:beff:fe96:78d9/64 scope link 
           valid_lft forever preferred_lft forever
    

    So now on a control host I have:

    broadcasting from local device on physical ethernet enp5s0

    sudo tcpdump -i enp5s0 -c 10 dst host 224.0.0.50 and port 9898 and multicast
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on enp5s0, link-type EN10MB (Ethernet), capture size 262144 bytes
    13:55:05.642963 IP lumi-gateway-v3_miio56591509.4321 > 224.0.0.50.9898: UDP, 
    length 136
    

    and now I also receive broadcasts from remote network device on tapz

    sudo tcpdump -i tapz -c 10 dst host 224.0.0.50 and port 9898 and multicast
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on tapz, link-type EN10MB (Ethernet), capture size 262144 bytes
    13:53:49.141751 IP 192.168.1.10.4321 > 224.0.0.50.9898: UDP, length 135
    

    So far that it what I was looking for I am getting necessary datagrams on a VPN client. OpenVPN on remote side can be also optimized on filter of information forwarded for multicasts.