Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] Camera access from WAN

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
kmchen
Posts: 74
Joined: 2013-04-24 06:29

[Software] Camera access from WAN

#1 Post by kmchen »

Hi,
I have a camera EZVIZ TY1 that I can access with the application motion at local network url rtsp://identifier:password@192.168.1.34:554/
I forwarded the port 554 from external IP to local IP of the camera and changed the motion config netcam_url to rtsp://identifier:password@externalip:554/
But no image appears and I get the following logs :
```
zmc_m1[484157]: ERR [zmc_m1] [Unable to open input rtsp://192.168.1.34/ due to: Server returned 401 Unauthorized (authorization failed)]

```
What did I missed ?

User avatar
kent_dorfman766
Posts: 529
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 56 times
Been thanked: 69 times

Re: [Software] Camera access from WAN

#2 Post by kent_dorfman766 »

your post is hard to read...you mean you have an IP camera on a NAT network behind a firewall, and you wish to access it from the open internet , thru firewall using port forwarding? Is that correct?

Assuming so...rtsp is not as simple as opening a single TCP port. it is a more complicated protocol than that. the TCP stream can be considered a control channel and the video frames are usually sent out of band via UDP...so you'll have to more thoroughly research how to make it work thru the NAT translation firewal..YMMV.

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#3 Post by kmchen »

Yes I try to access my local network through NAT translation in a router Huawei EG8145V5 on protocol rtsp.

Does it let me do that ?

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#4 Post by kmchen »

kent_dorfman766 wrote: 2023-01-11 10:16 make it work thru the NAT translation firewal..YMMV.
Could you give some explanations about doing that ?

User avatar
kent_dorfman766
Posts: 529
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 56 times
Been thanked: 69 times

Re: [Software] Camera access from WAN

#5 Post by kent_dorfman766 »

Could you give some explanations about doing that ?
I'm afraid that level of involvement moves from online forum help into the realm of paid consulting services.

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#6 Post by kmchen »

How much ?

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: [Software] Camera access from WAN

#7 Post by donald »

kent_dorfman766 wrote: 2023-01-16 14:07
Could you give some explanations about doing that ?
I'm afraid that level of involvement moves from online forum help into the realm of paid consulting services.

It absolutely does not.
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: [Software] Camera access from WAN

#8 Post by donald »

kmchen wrote: 2023-01-18 09:25How much ?
Instead of paying someone to do this, it would save you a bit more money learning how to set this up yourself, else you will be always paying someone to maintain this aspect of your system. Considering most cameras are security implements, you should invest knowledge in something that can be a hole in your own security.

To start you on your journey, figure out which ports you will need to have open for control and for viewing if applicable.

Here is my connection string for cameras that are inside of a VPN that I can connect to.

Code: Select all

rtsp://1.1.1.9:5050/server/system/instance/stream#/?user=username&password=Password&channel=1&stream=0.sdp" 
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#9 Post by kmchen »

Hey Donald, do you play contrabass ?

Well, nobody answered to my proposal anyway. The port is 554 as shown in my first post.
It seems that my problem now is not about the URL to fetch but the how I have to forward the port in my router.

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: [Software] Camera access from WAN

#10 Post by donald »

kmchen wrote: 2023-01-23 15:28 Hey Donald, do you play contrabass ?

Well, nobody answered to my proposal anyway. The port is 554 as shown in my first post.
It seems that my problem now is not about the URL to fetch but the how I have to forward the port in my router.
Cello mainly. Years ago I passed up on a beautiful double bass and regret it immensely. :(

Which router?
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1395
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 78 times
Been thanked: 173 times

Re: [Software] Camera access from WAN

#11 Post by steve_v »

FWIW, beside the aforementioned issues around NAT and rtsp, that
kmchen wrote: 2023-01-11 10:09Server returned 401
sounds suspiciously like the camera has some kind of "not my subnet" type security in place.
A VPN would be my take, as it would likely solve both problems, as well as being considerably more secure.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#12 Post by kmchen »

donald wrote: 2023-01-23 18:02 Cello mainly. Years ago I passed up on a beautiful double bass and regret it immensely. :(

Which router?
I'm a musician too. I was looking for a counterbass to record the bass part of that tune https://soundcloud.com/tlycti/leavin-is ... sets/peace

The router is HUAWEI EG8145V5
steve_v wrote: 2023-01-24 05:42 A VPN would be my take
Looks great but could you put me on the way to do this ? Would that pass by a VPN provider or building my own ?

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1395
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 78 times
Been thanked: 173 times

Re: [Software] Camera access from WAN

#13 Post by steve_v »

kmchen wrote: 2023-01-25 14:12Would that pass by a VPN provider or building my own ?
Not to be confused with "but mah pryvasee" scaremongering commercial VPN providers, not even slightly. I'm talking about a direct VPN link from $network_zoneminder_is_on to $network_camera_is_on. You would need a VPN server on one end or other, obviously.

Me, I run an openvpn server on my router so I can "road-warrior" into my LAN from wherever I happen to be, but whether that's practical here depends on how capable your router and its software stack is. I know nothing about Huawei products.
If your router can't, any box that can run $vpn_server_of_choice and has an appropriate internet-reachable port could also do the job.
An SSH tunnel might work too, and is considerably simpler to set up. It's not something I've ever tried with rtsp camera streams though, so YMMV.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#14 Post by kmchen »

It seems that my huawei router doesn't support openvpn and my ISP doesn't let me change it.

But I have a server on INTERNET. May I build a VPN on it and access my camera this way ?

arzgi
Posts: 1183
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: [Software] Camera access from WAN

#15 Post by arzgi »

kmchen wrote: 2023-02-10 07:34 It seems that my huawei router doesn't support openvpn and my ISP doesn't let me change it.
As already told, you should learn how to access your camera behind NAT etc.

At least here ISP providers block TCP ports under 1000. You could try that, and all the other steps mentioned in the thread.

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#16 Post by kmchen »

If your router can't, any box that can run $vpn_server_of_choice and has an appropriate internet-reachable port could also do the job
I installed an openvpn server internet-reachable on a VPS I have on internet. Then my conf looks like that:
Image
My question is: Can I connect to the camera from the openvpn client, knowing that the router can't run openvpn client and the camera accepts only local network connections ?
Last edited by kmchen on 2023-02-10 11:25, edited 2 times in total.

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: [Software] Camera access from WAN

#17 Post by donald »

@kmchen A quick online search about your router and the VPN yielded, for me at least, a lot of negatives about the brand and its features. You may find without a large user userbase behind the product and some security concerns with the product little to no support exists.

It may be ideal to find a new or second hand router that can run your own or work with OpenVPN.
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: [Software] Camera access from WAN

#18 Post by kmchen »

Then I guess the answer to my earlier question is: NO

So my ISP suggest to place a second router like that:
Image
Will that architecture let me access the camera and if yes how to configure it ?

Post Reply