Zend certified PHP/Magento developer

How to forward or fake device discovery broadcast replies

I have an IP camera which I wish to view remotely over the internet. Unfortunately the cloud service for this camera is no longer available nor does it support streaming standards for 3rd party use.

I have figured out the camera works over port 5000 (tcp) and I can in the desktop app add a static IP to connect to directly. So I have set up hamachi* to connect remotely to my home pc, then port forward hamachi ip:5000 to device ip:5000, and can access the camera remotely provided I have access to a remote pc with hamachi – which isn’t ideal. The problem comes with trying to access it via the Android app.

The android app for the camera unfortunately does not allow you to add the static IP. In LAN mode, it does device discovery on the local subnet. It sends an UDP broadcast msg to 255.255.255.255 port 2726. The camera on the same subnet then responds to 255.255.255.255 as well as 192.168.1.255. I am not sure if the app then determines the device IP from the source packet header or the data payload (which also contains some IP / mac info, which I haven’t quite figured out yet in wireshark).

Would it be possible for me to write a small app running on the hamachi home pc to respond to the app’s broadcast and either fake the response or relay (and NAT) the device response? I don’t know much about broadcast messages and device discovery, but have an okay handle on tcp/ip. Or better yet can a port forwarder/routing setup do this for me?

*I have successfully used hamachi’s gateway mode to bridge the vpn and home networks. With the remote client/app on the same subnet as the camera, the app can discover the camera and connect. However gateway mode for hamachi (or zerotier ) only works on desktops. For the final solution I am looking to deploy the camera at a remote location with a 4G router/modem and an android phone handling the vpn and port/ broadcast forwarding.