I have the IP webcam app installed on my Android phone and have set it up as a remote monitor in zoneminder
The remote hostname I'm using is just the local IP of my android phone (port is whatever it is set to in the IP webcam app). This all works fine when my phone is connected to my local network
What I'd like some advice on is how to get this setup working when I'm using my phone away from home. I'd like to ability to open the IP webcam app, start a stream, and have zoneminder pick it up and record the stream on my home server
Obviously for this to work my remote hostname can't be the phones local IP anymore
One thing I tried is set up a ddns updater on my phone so I can remotely update a domain name IP to the one my phone is currently at. I'm not sure if this will actually work though because when I'm in a coffee shop or something I have no control over what ports are opened on their router. So even if I set the port to 8080, zoneminder will look for dnsip:8080 but the traffic wont be forwarded to my android device
I also have an openvpn server set up on my server (where ZM is installed) and can connect to VPN on my phone. But will I run into the same port issues as using ddns?
Any advice on how to set up remote recording like this?
Remote streaming from my phone
Re: Remote streaming from my phone
To ensure your phone always appears with the same IP address as far as your Zoneminder is concerned means you will need a VPN and a bit of coordination. Dynamic DNS will always be too slow for you unless you run your own - internally and externally and to be honest I doubt you do!
Now, you have mentioned the magic word: OpenVPN - hooray.
You need to get your phone to have the same IP address when it is onsite and offsite. Your onsite DHCP server should have a static lease for the MAC address of your phone and OVPN (I think) can also put your phone on the same address when it is offsite via a client specific override.
I also suggest that you get your OVPN server to listen on 443/tcp instead of 1194/udp because it will look like just another https website and work through external firewalls that try to naively block VPNs because of the port and protocol used. I am assuming you use TLS/SSL for your OpenVPN. Remember to fix up the port forward on your router. Using tcp instead of udp can cause a tcp in tcp exponential standoff but modern systems are rarely affected by this and nowadays I only use tcp on port 443 on a *lot* of OpenVPN connections. Enable adaptive compression at first and experiment to see if it helps. Given that the stream is already compressed it may actually cause harm but it is "adaptive" so may help and modern processor power is unlikely to slow things down - I'd keep it switched on.
Get your networking fixed up and the ZM end of things should be easy. Unfortunately I can't speed up the dodgy wifi APs you will end up using but at least you will be safe
Cheers
Jon
Now, you have mentioned the magic word: OpenVPN - hooray.
You need to get your phone to have the same IP address when it is onsite and offsite. Your onsite DHCP server should have a static lease for the MAC address of your phone and OVPN (I think) can also put your phone on the same address when it is offsite via a client specific override.
I also suggest that you get your OVPN server to listen on 443/tcp instead of 1194/udp because it will look like just another https website and work through external firewalls that try to naively block VPNs because of the port and protocol used. I am assuming you use TLS/SSL for your OpenVPN. Remember to fix up the port forward on your router. Using tcp instead of udp can cause a tcp in tcp exponential standoff but modern systems are rarely affected by this and nowadays I only use tcp on port 443 on a *lot* of OpenVPN connections. Enable adaptive compression at first and experiment to see if it helps. Given that the stream is already compressed it may actually cause harm but it is "adaptive" so may help and modern processor power is unlikely to slow things down - I'd keep it switched on.
Get your networking fixed up and the ZM end of things should be easy. Unfortunately I can't speed up the dodgy wifi APs you will end up using but at least you will be safe
Cheers
Jon
Re: Remote streaming from my phone
OK so my router (which is my dhcp server) is set to assign a static IP to my phones MAC address (192.168....), my OVPN server is also set to assign a static IP to clients connecting with my phones OVPN profile. However, OVPN is running in a docker container and the static IP assigned to my phone is in the range of 172.28....
So, which static IP would my phone actually get?
Either way, even if I do manage to get the same IP for my phone, how is the port issue handled? Lets say I set OVPN to listen on 443. In my phone app I presumably would have to stream over 443? My router would have to forward 443 to OVPN to handle VPN things, so if I set the ZM remote port how would it filter through all the VPN traffic and get only the video streaming bits?
Also, to make things more complicated, I cant use 443 because that port is tied up for other things...
So, which static IP would my phone actually get?
Either way, even if I do manage to get the same IP for my phone, how is the port issue handled? Lets say I set OVPN to listen on 443. In my phone app I presumably would have to stream over 443? My router would have to forward 443 to OVPN to handle VPN things, so if I set the ZM remote port how would it filter through all the VPN traffic and get only the video streaming bits?
Also, to make things more complicated, I cant use 443 because that port is tied up for other things...