IP Camera access thru VPN tunnel

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
tbbrightman
Posts: 5
Joined: Mon Jul 20, 2020 9:34 pm

IP Camera access thru VPN tunnel

Post by tbbrightman »

I love the ZM system but I'm having no luck with access to my remote IP cameras.

My connection is through an IPSec site to site VPN tunnel. The cameras are fairly new Sunba models and can be accessed over the VPN using the Sunba VMS software. The remote subnet addresses are 192.168.2.X while the local subnet addresses are 192.168.128.X. Is this related to my problem?

I have a cheap local IP camera that I use to verify ZM operation and it works fine.

Any leads on this would be greatly appreciated.
apolonio
Posts: 14
Joined: Thu May 17, 2018 10:09 pm

Re: IP Camera access thru VPN tunnel

Post by apolonio »

I have purchased several cameras and DVR systems that I have no clue on how to access without the use of their software.

For IP Cameras
My first stop is usually to use nmap to port scan it to see if rstp is open (tcp/554). If it is, there is usually a good chance I can use this in zoneminder.
Then I use my google fu seaching on model numbers, similar devices etc to see if someone else has figured it out, I then use what they have figured out
If I could not find anything, I use tcpdump and/or wireshark to sniff out the traffic used by the app to view the camera feed and use that in my ZM monitor settings.
Once you get the rtsp settings, test it with VLC to see if you can watch the camera feed.
Worst case there is sometimes a static page I can grab an image from the camera via simple wget.

For local Cameras
I usually bank on it being video4linux compatible. If there is an entry in /dev/ for videoN it stands a good change of being available in zoneminder.
I test to see what it is capable of by using the following v4l2-ctl --list-formats-ext -d /dev/video0

If none of these work, or if it requires a mobile app, then I add it to my pile of curious things never to buy again.
tbbrightman
Posts: 5
Joined: Mon Jul 20, 2020 9:34 pm

Re: IP Camera access thru VPN tunnel

Post by tbbrightman »

Thanks for the speedy reply.

I'm at the wireshark stage with this guy at the moment. I have a mac at the remote site that I can access as a VNC shared desktop to check things out with the manufacturer's VMS software. I also run Wireshark on that mac to examine camera activity. All is normal.

I then run the mfr's VMS software on a mac connecting to the remote site thru the VPN tunnel. All is OK.

This tells me that the network connection is OK and that no firewall (at least in MacOS) is blocking me.

Then, if I try ZM on Ubuntu there is no connection. Nor can I connect with VLC on Ubuntu. I can connect to my cheap-o camera on my local subnet with both ZM and VLC. Is there some Ubuntu firewall tripping me up?

Sorry to be so ignorant of Ubuntu, but I'm making the switch from Mac to Ubuntu so there are gaps in my Ubuntu knowledge that I know to check in MacOS or Win10.
tbbrightman
Posts: 5
Joined: Mon Jul 20, 2020 9:34 pm

Re: IP Camera access thru VPN tunnel

Post by tbbrightman »

Consider the matter resolved.

There may have been a firewall issue but I corrected that possibility.

The real culprit was Chinglish! Rather than use terms consistently, the RTSP URLs use English words mixed with numbers in very un-English ways.

So rather than a URL that says 'Channel=Main' or 'Channel=Monitor' the URL read 'Channel=0' and 'Channel=1'. Unless you wrote the code, you have to play detective to determine that '1' means 'Monitor' or 'Secondary'. Jumping to the vendor's VMS program and crossing fingers, the 'Main' stream encoding can be set and an RTSP URL using Channel=0 can be tried.

Like I said, success!

Now for some time on ZM.
apolonio
Posts: 14
Joined: Thu May 17, 2018 10:09 pm

Re: IP Camera access thru VPN tunnel

Post by apolonio »

Good job, can you post the make and model and the rtsp url used.

For future generations :-)
rip
Posts: 38
Joined: Sun Sep 02, 2012 8:59 pm

Re: IP Camera access thru VPN tunnel

Post by rip »

Those cam are pretty neat, looking at their website, would be nice to get those PTZs working with ZM and better if they got around to 4MP versions some day for a nice, cheap HQ PTZ. They're all 2mp/1080 now.

You can add your experience to https://wiki.zoneminder.com/Hardware_Compatibility_List and save others days of trying. :)
Post Reply