you mentioned you’re using pfSense. Did you use the start up scripts to make sure udp-proxy-2020 runs as a service (always running)?
Yes, I followed the startup instructions on github (udp-proxy-2020/startup-scripts/pfSense at main · synfinatic/udp-proxy-2020 · GitHub) and whenever I request for status it says it is active and running. Perhaps I set something up wrong?
For the config, I simply added the config file and modified it like this:
change the port and add --dev {dev-name} as many times as needed.
udp_vars="–port 9003 --interface igb1.100,igb1.200,ovpns3 --logfile /var/log/udp-proxy-2020.log"
I didn’t add any additional ports, or add —dev… am I missing something? Only running the command:
udp-proxy-2020 --port 9003 --interface igb1.100,igb1.200,ovpns3 --cachettl 300
Allows my devices to be recognized. They stay recognized until a network disconnect. After a wake up or reconnection, I must run that command over ssh again.
Any suggestions?
Check the output of:
ps auxww | grep udp-proxy-2020
You should see something like this:
$ ps auxww | grep udp-proxy-2020
root 78084 0.0 0.0 10748 2316 - Is Mon20 0:00.00 daemon: /usr/local/bin/udp-proxy-2020[78271] (daemon)
root 78271 0.0 0.1 739712 20016 - S Mon20 10:56.23 /usr/local/bin/udp-proxy-2020 --port 9003 --interface lagg0,lagg0.200,lagg0.500,ovpns2,ovpns6 --logfile /var/log/udp-proxy-2020.log
root 95113 0.0 0.0 11052 2668 0 R+ 22:06 0:00.00 grep udp-proxy-2020
You should see the flags you specify in `udp_vars` in the above output.
If not, try restarting via:
service udp-proxy-2020 stop
service udp-proxy-2020 start
Beyond that, i’m not sure what you mean by “They stay recognized until a network disconnect. After a wake up or reconnection, I must run that command over ssh again.”
What is disconnecting from the network?
ps auxww | grep udp-proxy-2020
root 9879 0.0 0.1 10752 2340 - Is
16:59 0:00.00 daemon: /usr/local/bin/udp-
proxy-2020[9940] (daemon)
root 9940 0.0 0.5 734564 21028 - I
16:59 0:35.73 /usr/local/bin/udp-proxy-20
20 --port 9003 --interface igb1.21,igb1.500,igb
1.200,ovpns3 --logfile /var/log/udp-proxy-2020.
log
root 23342 0.0 0.1 11192 2700 0 S+
01:22 0:00.00 grep udp-proxy-2020
Apologies if the formatting is terrible…. I am using my phone to ssh and reply.
This is the output, and from what I can see, it looks like it is what I should be expecting.
Here is what I am experiencing on my end:
Run roon on iOS which is connected to my home network via OpenVPN. I can see my library, access settings etc. When I navigate to settings → audio, my phone does not show up as a zone… at least not until I ssh into my pfsense router and run:
udp-proxy-2020 --port 9003 --interface igb1.21,igb1.500,igb1.200,ovpns3 --cachettl 300
At this point, If I close the app and reopen, I get iPhone as an audio zone. When I get home, and the phone switches over to WiFi which VLAN tag is included in my config, it won’t show as an audio device until the above command is executed on pfsense.
This same scenario applies while I am at home, on WiFi, or using a device over Ethernet. I have to run the command above, the devices get picked up as audio zones and everything is good. If I put my Linux pc to sleep (it has Roon bridge) I would then need to rerun the command.
Why don’t you put --cachettl 300
in /usr/local/etc/udp-proxy-2020.conf
?
Did this, stoped the service and restarted. Roon on iOS picked up as an audio zone immediately. I disconnected from my VPN, reconnected, and it doesn’t recognize the phone as a zone anymore. Same behavior as before.
Seems like I need to have a loop running to execute the command…
Edit: I have a netgate SG-5100 and used the freebsd-amd64 release
Edit 2: Also have tried adding the —fixed-Ip= parameter
Edit 3: I created a cron task for running udp-proxy-2020 —port 9003 —interface (my interfaces) —cachettl 300 every minute and it seems to be a temporary solution to my issue!
Edit 4: ok… that might not be a good solution. I think it’s creating a new process every minute haha.
So if you have it starting every minute via cron then there are two possibilities:
- You now have many (hundreds?) copies of udp-proxy-2020 running on your system eating up resources and crashing when your firewall runs out of RAM.
- You don’t have a lot of copies of udp-proxy-2020 because they are crashing before your firewall runs out of RAM for some other reason.
You say you run udp-proxy-2020
manually and Roon works and then later it stops working… I’m curious about this. What is happening on your ssh session? Is udp-proxy-2020 still running? Has it exited? Has your ssh session quit/timed out/disconnected or anything like that? Or are you having to hit CTRL-C to kill it and start it again?
Because if it is running then running another instance of udp-proxy-2020 is well, not helpful. Unless it dead-locked (this would be a new bug) and now you have as I mentioned above many copies of udp-proxy-2020 sitting around eating all your RAM on your firewall. Or it is crashing and for some reason you’re not noticing that. In which case we should try and figure that out.
If you are running udp-proxy-2020 manually via ssh, skip the --logfile
argument and add --debug
and it should start logging. Then start Roon and capture all the output and paste it here in a block for easier reading. You can use 3 back ticks like this:
```
logs go here
and here
and here
```
and it will look like this:
logs go here
and here
and here
It should keep running in the foreground of your ssh session until you CTRL-C and then restarting Roon will have issues connecting to the Core.
So if you have it starting every minute via cron then there are two possibilities:
1. You now have many (hundreds?) copies of udp-proxy-2020 running on your system eating up resources and crashing when your firewall runs out of RAM. 2. You don’t have a lot of copies of udp-proxy-2020 because they are crashing before your firewall runs out of RAM for some other reason.
What I see is 1. many many copies taking up ram and utilizing CPU.
You say you run udp-proxy-2020 manually and Roon works and then later it stops working… I’m curious about this. What is happening on your ssh session? Is udp-proxy-2020 still running? Has it exited? Has your ssh session quit/timed out/disconnected or anything like that? Or are you having to hit CTRL-C to kill it and start it again?
ssh sessions continue to work uninterrupted and as expected. No hang ups requiring ctrl-c etc.
Because if it is running then running another instance of udp-proxy-2020 is well, not helpful. Unless it dead-locked (this would be a new bug) and now you have as I mentioned above many copies of udp-proxy-2020 sitting around eating all your RAM on your firewall. Or it is crashing and for some reason you’re not noticing that. In which case we should try and figure that out.
Yes, I believe just many copies run. Whenever I ping for a status it says it is running - however, when I had a few hundred instances I did get an unexpected error (something about the files not being where they were supposed to be). When I run restarted my router and just ran the - service udp-proxy-2020 start - command, and - service udp-proxy-2020 status - command, it says its up and running, and continues to do so after retrying after a while.
OK, debug logs.
This one I stoped the service (using - service udp-proxy-2020 stop -), and ran the SSH command shown in the log.
Note: No audio zones were found on either iOS device. I have an active roon bridge running on my linux machine, that was not picked up either. I will try to restart everything and run the debug command again in another log to follow.
[21.05.1-RELEASE][admin@pfsense.localdomain]/root: udp-proxy-2020 --port 9003 --interface igb1.21,igb1.500,igb1.200,ovpns3 --cachettl 300 --debug
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:43 main.newListener() igb1.21: ifIndex: 13
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:53 main.newListener() igb1.21 network: ip+net string: fe80::290:bff:fea2:9d68/64
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:53 main.newListener() igb1.21 network: ip+net string: 192.168.21.1/24
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:92 main.newListener() Listen: {igb1.21 0xc00005a100 [9003] 192.168.21.255 false <nil> 250000000 0 0xc000064300 map[]}
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:43 main.newListener() igb1.500: ifIndex: 12
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:53 main.newListener() igb1.500 network: ip+net string: fe80::290:bff:fea2:9d68/64
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:53 main.newListener() igb1.500 network: ip+net string: 192.168.50.1/24
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:92 main.newListener() Listen: {igb1.500 0xc00005a380 [9003] 192.168.50.255 false <nil> 250000000 0 0xc0000643c0 map[]}
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:43 main.newListener() igb1.200: ifIndex: 15
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:53 main.newListener() igb1.200 network: ip+net string: fe80::290:bff:fea2:9d68/64
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:53 main.newListener() igb1.200 network: ip+net string: 192.168.200.1/24
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:92 main.newListener() Listen: {igb1.200 0xc00005a580 [9003] 192.168.200.255 false <nil> 250000000 0 0xc000064480 map[]}
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:43 main.newListener() ovpns3: ifIndex: 16
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/listen.go:92 main.newListener() Listen: {ovpns3 0xc00005a740 [9003] true <nil> 250000000 0 0xc000064540 map[]}
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:54 main.initializeInterface() igb1.21: applying BPF Filter: udp port 9003
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:66 main.initializeInterface() Opened pcap handle on igb1.21
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:54 main.initializeInterface() igb1.500: applying BPF Filter: udp port 9003
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:66 main.initializeInterface() Opened pcap handle on igb1.500
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:54 main.initializeInterface() igb1.200: applying BPF Filter: udp port 9003
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:66 main.initializeInterface() Opened pcap handle on igb1.200
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:54 main.initializeInterface() ovpns3: applying BPF Filter: udp port 9003
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/interfaces.go:66 main.initializeInterface() Opened pcap handle on ovpns3
DEBU[0000]/home/vagrant/udp-proxy-2020/cmd/main.go:134 main.main() Initialization complete!
DEBU[0005]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.200) ticker
DEBU[0005]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.21) ticker
DEBU[0005]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.500) ticker
DEBU[0005]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(ovpns3) ticker
DEBU[0010]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.21) ticker
DEBU[0010]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(ovpns3) ticker
DEBU[0010]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.500) ticker
DEBU[0010]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.200) ticker
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.500) ticker
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(ovpns3) ticker
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.21) ticker
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:131 main.(*Listen).handlePackets() handlePackets(igb1.200) ticker
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.21: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.500: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.200: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.200 => 192.168.200.255: packet len: 361: ffffffffffff00900ba29d6808004500015b716000004011a8dcc0a81505c0a8c8ffee21232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.500 => 192.168.50.255: packet len: 361: ffffffffffff00900ba29d6808004500015b7160000040113eddc0a81505c0a832ffee21232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.21: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.500: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.200: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.21: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.500: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.200: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.200 => 192.168.200.255: packet len: 361: ffffffffffff00900ba29d6808004500015ba6460000401173f6c0a81505c0a8c8ffe42c232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.500 => 192.168.50.255: packet len: 361: ffffffffffff00900ba29d6808004500015ba6460000401109f7c0a81505c0a832ffe42c232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.500 => 192.168.50.255: packet len: 361: ffffffffffff00900ba29d6808004500015bbc5800004011f3e4c0a81505c0a832ffc91a232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.200 => 192.168.200.255: packet len: 361: ffffffffffff00900ba29d6808004500015bbc58000040115de4c0a81505c0a8c8ffc91a232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.200: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.21: sending out because we're not igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.500: sending out because we're not igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.200 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.500: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.200: sending out because we're not igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.21: sending out because we're not igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.500 on igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.200 => 192.168.200.255: packet len: 361: ffffffffffff00900ba29d6808004500015b716000004011a8dcc0a81505c0a8c8ffee21232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.500 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.200 on igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.21 => 192.168.21.255: packet len: 361: ffffffffffff00900ba29d6808004500015b7160000040115bddc0a81505c0a815ffee21232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.500 on igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.21 => 192.168.21.255: packet len: 361: ffffffffffff00900ba29d6808004500015b7160000040115bddc0a81505c0a815ffee21232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.200 on igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:290 main.(*Listen).sendPacket() igb1.500 => 192.168.50.255: packet len: 361: ffffffffffff00900ba29d6808004500015b7160000040113eddc0a81505c0a832ffee21232b01470000534f4f4402510e636f6e6669675f76657273696f6e0001310a736572766963655f6964002464373633346238352d383139302d343730662d616135312d366362353533386463316239045f746964002445314138303144372d454644332d334536452d314533352d4538423332423034333436450a6d616368696e655f6964002436316365343638352d303731342d346530612d386464372d30353566373266363163306609756e697175655f6964002430373162396566332d623262332d346366612d613462362d3732613833623363643266380c6d616368696e655f6e616d650004695061640a6f735f76657273696f6e0008694f532031342e300669735f6465760001301070726f746f636f6c5f76657273696f6e0001310c726161745f76657273696f6e0006312e312e3338087463705f706f7274000439323030
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.21: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.200: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.500: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.500: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.200: sending out because we're not igb1.21
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.21: sending out because we're not igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:128 main.(*Listen).handlePackets() igb1.21: received packet and fowarding onto other interfaces
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.500: sending out because we're not igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.200 on ovpns3
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.21: sending out because we're not igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:199 main.(*Listen).sendPackets() ovpns3: Unable to send packet; no discovered clients
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/listen.go:153 main.(*Listen).sendPackets() processing packet from igb1.21 on igb1.200
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() ovpns3: sending out because we're not igb1.500
DEBU[0015]/home/vagrant/udp-proxy-2020/cmd/send.go:32 main.(*SendPktFeed).Send() igb1.200: sending out because we're not igb1.500
I am going to follow up with some logs shortly… 32K character limit here was a pain. Going to get this out of the way and try to post as much info as possible… had a whole thing written up haha
THANK YOU SO MUCH
Probably unnecessary information, wanted to include so there are no questions on how I setup this on my pfsense:
Here is my config file:
[21.05.1-RELEASE][admin@pfsense.localdomain]/etc: cat /usr/local/etc/udp-proxy-2020.conf
# change the port and add --dev {dev-name} as many times as needed.
udp_vars="--port 9003 --interface igb1.21,igb1.500,igb1.200,ovpns3 —-cachettl 300 --logfile /var/log/udp-proxy-2020.log"
Here is my rc.conf.local file:
21.05.1-RELEASE][admin@pfsense.localdomain]/etc: cat /etc/rc.conf.local
udp_proxy_2020_enable=YES
Here is /usr/local/etc/rc.d
[21.05.1-RELEASE][admin@pfsense.localdomain]/usr/local/etc/rc.d: cat udp-proxy-2020
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: udp-proxy-2020
# REQUIRE: DAEMON NETWORKING
#
# Add the following lines to /etc/rc.conf.local to enable UDP Proxy 2020
#
# udp_proxy_2020_enable="YES"
#
. /etc/rc.subr
. /usr/local/etc/udp-proxy-2020.conf
name=udp_proxy_2020
rcvar=udp_proxy_2020_enable
pidfile=/var/run/udp-proxy-2020.pid
extra_commands="status cleanup"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
status_cmd="${name}_status"
cleanup_cmd="${name}_cleanup"
status_cmd="${name}_status"
load_rc_config ${name}
: ${udp_proxy_2020_enable:=no}
udp_proxy_2020_start() {
/usr/sbin/daemon -cf -p ${pidfile} /usr/local/bin/udp-proxy-2020 ${udp_vars}
}
udp_proxy_2020_stop() {
[ -f ${pidfile} ] && kill `cat ${pidfile}` || echo "Unable to kill ${name}. Missing pid file?"
}
udp_proxy_2020_cleanup() {
[ -f ${pidfile} ] && rm ${pidfile}
}
udp_proxy_2020_status() {
if [ ! -f ${pidfile} ]; then
echo "udp-proxy-2020 is not running."
elif [ -n "$(pgrep -F ${pidfile} udp-proxy-2020)" ] ; then
echo "udp-proxy-2020 is running ($(cat ${pidfile}))"
else
echo "udp-proxy-2020 is not running but left stale pidfile."
fi
}
Here is the binary in the correct folder:
[21.05.1-RELEASE][admin@pfsense.localdomain]/usr/local/etc/rc.d: ls
choparp dhcp6relay expiretable igmpproxy isc-dhcrelay miniupnpd openvpn radvd smartd socat udp-proxy-2020
dbus dhcp6s haproxy isc-dhcpd isc-dhcrelay6 mpd5 pcscd rrdcached snort sshguard unbound
dhcp6c dnsmasq haproxy.sh isc-dhcpd6 microcode_update nginx php-fpm scponlyc snort.sh strongswan xinetd
Not sure how to prove chmod’s happened, but I ran the commands… several times.
OK… for more info here we go…
(if I didn’t say it, thanks again)
Linux machine:
● roonbridge.service - RoonBridge
Loaded: loaded (/etc/systemd/system/roonbridge.service; enabled; vendor pr>
Active: active (running) since Thu 2021-10-21 17:43:07 PDT; 28min ago
Main PID: 24974 (start.sh)
Tasks: 25 (limit: 19013)
Memory: 114.2M
CGroup: /system.slice/roonbridge.service
├─24974 /bin/sh /opt/RoonBridge/start.sh
├─24977 RoonBridge --debug --gc=sgen --server RoonBridge.exe
├─24990 RoonBridgeHelper --debug --gc=sgen --server RoonBridgeHelp>
├─24996 /opt/RoonBridge/Bridge/processreaper 24990
└─24998 RAATServer --debug --gc=sgen --server RAATServer.exe
Oct 21 17:43:07 Office systemd[1]: Started RoonBridge.
Oct 21 17:43:07 Office start.sh[24977]: 00:00:00.001 Warn: get lock file path:>
Oct 21 17:43:07 Office start.sh[24977]: 00:00:00.055 Trace: [childprocess] usin>
Oct 21 17:43:07 Office start.sh[24977]: Initializing
Oct 21 17:43:07 Office start.sh[24977]: 00:00:00.072 Info: Starting /opt/RoonB>
Oct 21 17:43:07 Office start.sh[24977]: 00:00:00.076 Info: ConnectOrStartAndWa>
Oct 21 17:43:07 Office start.sh[24977]: Not Running (.o)
Oct 21 17:43:07 Office start.sh[24990]: 00:00:00.004 Warn: get lock file path:>
Oct 21 17:43:07 Office start.sh[24977]: Running
I will STOP and RESTART this ^ just in case
Here is the command (again):
udp-proxy-2020 --port 9003 --interface igb1.21,igb1.500,igb1.200,ovpns3 --cachettl 300 --debug
ROON ROCK server on .200, computer, ipad on .21, iphont on ovpns3… now lets hope i can get some useful logs within the char limit. will start a new post just in case.
So first, you just want a single copy of udp-proxy-2020
running.
Based on the logs it appears that no Roon discovery packets are arriving on ovpns3
OpenVPN tunnel interface. Considering the Roon client (which should be on that VPN interface) must initiate the connection to the Core, this would indeed cause a problem like you describe. There is no reason running multiple copies of udp-proxy-2020
would “fix that” so I believe this to be a red herring. Sometimes correlation is not causation!
Assuming that your iOS device is actually connected to the VPN, then most likely, your Roon client on your phone is exhibiting the random “won’t initiate discovery bug when switching to the app” issue I’ve seen before. To fix this, you need to hard-restart the Roon app on your iOS device.
On iPhones/iPad with an home button you double click the home button and then find the Roon app “running” in the background tab and then slide up to “kill the app”. Then start Roon normally. That fixes the issue for me about 99% of the time (sometimes I have to do this twice).
If you have one of those fancy iPhones without a home button, you’ll have to google how to do that or just reboot your phone works too.
OK! I was going to post a lot more, but the forums here limit you to 3 replies for spam reasons i guess. I will sleep on this, and give it a few days and report back. Thanks!
Feel free to open a ticket on github if that helps. you can even attach log files/screen shots if that makes it easier.
I’ve got it to work using a Mikrotik router (RB5009, running 7.1rc4) and a wireguard tunnel established between my Samsung Android device. They magically find each other without any UDP proxy required. I’ve enabled the Phone’s audio interface in Roon and enjoy listening to music.
The author can be found here:
I can be found also here
Thanks to @TKronic for working with me off line on his issue. Was able to diagnose an issue with the Netgate SG5100 NIC/driver which caused Roon discovery to be flooded which confused Roon and add a work around to prevent this problem here and other hardware with the same issue. There are no doubt other devices with the same bug, but sorry I don’t have a complete list for obvious reasons.
Anyways, I’ve released a new version of udp-proxy-2020 <== download here!
This is also the first official release for FreeBSD ARM64, ARMv7 and ARMv6 hardware for those inexpensive pfSense boxes.
Hello @Aaron_Turner I’ve been fooling w/ the remote Roon thing for a couple years now and while I’ve gotten a few different techniques working, nothing so far has worked consistently. I came across this thread tonight and was skimming through it, trying to learn about your upd-proxy-2020 program. I currently have a Netgate 6100 running PfSense+, do you happen to know if it can forward packets like it sounds like your program does? If not, is there a way to add your program to PfSense w/o messing it up? Is there no way to bridge the WireGuard subnet w/ the home network? Isn’t that what NAT is supposed to do?
I currently have a few different Wireguard setups on there (a road warrior type one and a “site-to-site,” one that just goes to my cell) to get this working properly. I’ve been fooling w/ the FRR package, 1:1 NATting, and other things, but it only half-works. I can easily login remotely, but my phone doesn’t show up as a device, so I can’t play music on it. When I first setup my iPhone as a site-to-site though, it did work for about a day. A couple days later, nada. It’s crap like this that’s driving me crazy.
If you’d rather send me a link to threads where you’ve addressed my questions above, feel free to send those instead. I know it can get frustrating repeating oneself over time.
I appreciate any time you can spare me. Thank you!
- Matt
Hi @bymatty,
Yes, it won’t mess up your pfSense. I actually run pfSense at home myself. The only question is your 6100 has an Intel Atom CPU which I think will work with the x86 build? Worst case it won’t run at all and just generate an error.
That said, I don’t use Wireguard on my pfSense- I use OpenVPN since it is better supported. But it should work- just specify the Wireguard interface (wg0??).
This should have more info: udp-proxy-2020/startup-scripts/pfSense at main · synfinatic/udp-proxy-2020 · GitHub
hello @bymatty,
I ended up on this thread trying to access and listen to my Roon Core remotely from my iPhone. Your thread seems quite technical and I’m not sure this could work with my setup but I have a feeling this might do the trick.
Will your upd-proxy-2020 program work on an Asus RT-AC68U router (ARM Broadcom cpu) running Asuswrt-Merlin firmware ?
So far I’ve been able to make everything work (browse and play from a remote iMac) except from my iPhone on which I can login to the Roon database but the iPhone itself is not available as a Roon endpoint and therefore cannot play music.
Thanks.