3

I've been trying to find a way to allow a sever in a certain subnet to send UDP broadcasts over multiple subnets. The scenario is this:

In network A (192.168.1.0/24) we have a backup server (using urbackup), the server uses automatic discovery of LAN hosts using UDP broadcast, every 50 seconds it sends a broadcast, this work fine in network A.

But we also have a remote site (192.168.5.0/24) that also needs to use this backup server, but since auto-discovery doesn't work there, we have to manually add all the servers.

urbackup server will send a UDP broadcast on each specified network interface, so I can add another interface with IP 192.168.5.X, but I need a way to get the broadcast over to the remote site.

I've tried setting up a GRE tunnel and using a bridge to connect the two networks, but that didn't work (either I didn't do it correctly, or I missed something). I've setup two VMs and tried the following:

gre1:
    ip link set dev ens192 down
    ip link add gretap1 type gretap local 192.168.1.X remote 192.168.5.X
    ip link set dev gretap1 up
    ip link set dev ens192 up

    brctl addbr br1
    brctl addif br1 gretap1
    brctl addif br1 ens192

    ip addr add 10.0.0.1/24 dev br1
    ip link set br1 up


gre5:
    ip link set dev ens192 down
    ip link add gretap1 type gretap local 192.168.5.X remote 192.168.1.X
    ip link set dev gretap1 up
    ip link set dev ens192 up

    brctl addbr br1
    brctl addif br1 gretap1
    brctl addif br1 ens192

    ip addr add 10.0.0.2/24 dev br1
    ip link set br1 up

After messing around with GRE for two days, currently if I try the above configuration it crashes the ESX gre1 is hosted on (no idea why).

Here is our network diagram (we are using pfsense 2.4 on both sites)

Here is our network diagram (we are using pfsense 2.4 on both sites)

I also thought about setting up a L2TP VPN on site B, but can it provide IPs from same subnet as the DHCP?

2

UDP Broadcast traffic will not normally be forwarded across your pfsense VPN.

There's a very short c program (source here) called udp-proxy that should solve your problem.

You would want to run two copies of udp-proxy, one on a server on your 192.168.5.0/24 and another copy on a server at 192.168.1.0/24.

Let's say that your backup software broadcasts to port 5000, then you would do:

udp-proxy 5000 $IP_OF_SERVER_ON_OTHER_SIDE_OF_VPN

Then on that remote server you would do:

udp-proxy 5000 192.168.1.255 # to forward to the broadcast address
  • I managed to get the broadcast across to 192.168.5.0/24, and the clients are receiving it and responding back, however, they are responding to the udp-proxy server and not the actual backup server, I tried using iptables to forward the response to the backup server, with tcpdump I see the backup server receives the packet, but it's not donging anything with it, using tcpdump -Xni ens224 net 192.168.5.0/25 I noticed the returned packets to the backup server are a little different then the ones the udp-proxy server receives, not sure if I'm missing something or it's an issue with urbackup. – Alex Zel Oct 25 '17 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.