Solved

security camera on the web

Posted on 2004-08-14
16
868 Views
Last Modified: 2008-01-09
Hi I have a D-Link DSC 2000 web based security camera.
According to the d-link site putting the feed onto a web page IS NOT a supported feature.  However they did provide this code:
I placed it in my page and the box displayed however it didn't connect. Or as far as i could tell attempt to connect.  
So my question is what do the different IP addresses in the code probably mean?

Should this be in another topic area?

IP Adress: 66.45.99.*8
Default router: 66.45.99.*3
Primary DNS: 66.45.96.4
Secondary DNS:  66.45.101.5

<script language="JavaScript">  
<!--
if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC")) {
document.write("<OBJECT ID=\"VACtrl\" WIDTH=330 HEIGHT=270");
document.write(" CLASSID=CLSID:A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C");
document.write(" CODEBASE=\"http://66.45.99.*8:202/plugin/h263ctrl.cab#version=1,7,0,1\">");
document.write("<PARAM NAME=\"Url\" VALUE=\"http://66.45.99.*8:202/cgi-bin/video.vam\">");
document.write("<PARAM NAME=\"VSize\" VALUE=\"CMS\">");
document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"http://66.45.99.*8:202-899372864\">");
document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5004\">");
document.write("<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">");
document.write("<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"false\">");
document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
document.write("</OBJECT>");
}
 //-->  
</script>
0
Comment
Question by:livegirllove
  • 8
  • 5
  • 3
16 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 11803570
The astrisk should be numbers. The number after the dot should not be greater then 255.
But it has to be a real machine behind the address.

Does this example help you:

<script language="JavaScript">      
<!--      if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC"))      {
        document.write("<OBJECT ID=\"VaCtrl\" WIDTH=362 HEIGHT=270");
        document.write(" CLASSID=CLSID:98264495-6376-443C-9340-2996038BD143");
        document.write(" CODEBASE=\"http://login:password@PUBLIC WAN ROUTER IP ADDRESS:8000/plugin/h263ctrl.cab#version=1,5,0,3\">");
        document.write("<PARAM NAME=\"Url\" VALUE=\"http://login:password@PUBLIC WAN ROUTER IP ADDRESS:8000/cgi-bin/video.vam\">");
        document.write("<PARAM NAME=\"VSize\" VALUE=\"SIF\">");
        document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"352430272\">");
        document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5001\">");
        document.write("<PARAM NAME=\"RemoteID\" VALUE=\"27992\">");
        document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
        document.write("<PARAM NAME=\"Stretch\" VALUE=\"0\">");
        document.write("</OBJECT>");
      }      
//-->      
</script>

The example is for D-link DCS-5300
But you see that in your example you need to know your routers ip address.
Also you need to open the ports in your router mentioned in your example.

The whole topic is fare behind a JavaScript problem. It is more a router and camara connection problem. Did you configure your camara? Do you know camara's ip address and ports?

 
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11804756
The asterick is a number but I wasnt going to put the ip address and router ip on the internet for everybody to see, since nothing is currently secured.
This is the info from the config area of the camera
IP Adress: 66.45.99.*8
Default router: 66.45.99.*3
Primary DNS: 66.45.96.4
Secondary DNS:  66.45.101.5
The camera works fine, sound etc, so yes it is configured,'
'

thanks
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11804860
HTTP
  HTTP port 80
Streaming
  Control channel port  5001
  Audio channel port  5002
  Video channel port  5003
0
 
LVL 5

Expert Comment

by:vilia
ID: 11804992
Some testing hints:

- DHCP and fixed IP. IP camera has a fixed IP address. Verify with net people the
  particular IP is not in address pool of the DHCP server.
- Camera operates at port 202. Firewall (usually) blocks that port.

Setup a test environment:
- Use a dummy 4/8 ports hub
- Assign an IP address to the camera (100.100.100.20)
- Assign an fixed IP address to the computer (100.100.100.30)
- In the html file change http://66.45.99.*8... to http://100.100.100.20....
- Try connection

(As both devices are on the same subnet the router IP is not important, you can
put 100.100.100.1 both on camera and PC)

If connection does not work. Put the second PC on hub with IP 100.100.100.40.
The PC is going to be a net analyzer with network card in promiscuous mode so
you would be able to see what is going on.

If you run into problems, please let me know.
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11805018
thanks for the suggestions-
the main problem is that I am on the west coast and the camera is on the east coast ;-)
So I'll have to work with the admin there to test this out.

I'll get back with more questions,
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11805126
If your camera is bhind a router, then you have to map in the router the port comming from internet to the local ip address and port.
Like this:
<script language="JavaScript">  
<!--
if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC")) {
document.write("<OBJECT ID=\"VACtrl\" WIDTH=330 HEIGHT=270");
document.write(" CLASSID=CLSID:A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C");
document.write(" CODEBASE=\"http://66.45.99.*8:202/plugin/h263ctrl.cab#version=1,7,0,1\">");
document.write("<PARAM NAME=\"Url\" VALUE=\"http://66.45.99.*3:202/cgi-bin/video.vam\">");
document.write("<PARAM NAME=\"VSize\" VALUE=\"CMS\">");
document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"http://66.45.99.*3:202-899372864\">");
document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5004\">");
document.write("<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">");
document.write("<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"false\">");
document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
document.write("</OBJECT>");
}
 //-->  
</script>

Now in the router at ip address of  66.45.99.*8 you have to map the incomming requests to ports 202 and 5004 to inner IP address 66.45.99.*8 and ports 202 and 5004

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11805204
Sorry, you have to map requests to routers ip address 66.45.99.*3 to the camera ip address 66.45.99.*8

So in the html sourse you call for routers address and the router forwards your request to the camera address.

0
 
LVL 5

Expert Comment

by:vilia
ID: 11805212
> the main problem is that I am on the west coast and the camera is on the east coast ;-)

Test environment:
- Your local PC, no change
- Instead of the camera connect a PC with:
     fixed IP address: 66.45.99.*8
     router ip: 66.45.99.*3
     subnet mask: 255.255.255.0
- On the remotePC run a web server, or telnet server on port 202
- try to connection from your PC
    web browser: http://66.45.99.*8:202
    telnet:   telnet 66.45.99.*8 202
- repeat the same for port 5004

When both tests successfully pass connect the camera and run published html.



0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 5

Expert Comment

by:vilia
ID: 11830777
Have you got a chance to run "coast to coast test": (vilia 08/15/2004 12:36PM PDT) ?
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11833761
Hi Was out of town and just got a chance to try it.
I don't have an admin on site there so I'm going to have to wait a bit.
BUT....
I viewed the source of the frame that has the video feed in it.
this is the source:
<script language="JavaScript">
      <!--
      if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC"))
      {
        document.write("<OBJECT ID=\"VACtrl\" WIDTH=330 HEIGHT=270");
        document.write(" CLASSID=CLSID:A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C");
        document.write(" CODEBASE=\"/plugin/h263ctrl.cab#version=1,7,0,1\">");
        document.write("<PARAM NAME=\"Url\" VALUE=\"/cgi-bin/video.vam\">");
        document.write("<PARAM NAME=\"VSize\" VALUE=\"CMS\">");
        document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"-966578878\">");
        document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5001\">");
        document.write("<PARAM NAME=\"RemoteID\" VALUE=\"25466\">");
        document.write("<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">");
        document.write("<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"false\">");
        document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
        document.write("</OBJECT>");
      }
      //-->
      </script>

Now I get the black box AND it attempts to connect.  This is better than before ;-)

But it pops up a windows warning that says:

Warning
Because the connection problem of network environment, transmission protocol changes to HTTP
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11833940
OK Im getting closer here:
Now it attempts to connect the pops up an error:
Warning:
Fail to connect server

Then if I hit OK (the only option)
The video feed displays.

So it works but any ideas where that error comes from?


<script language="JavaScript">
      <!--
      if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC"))
      {
        document.write("<OBJECT ID=\"VACtrl\" WIDTH=330 HEIGHT=270");
        document.write(" CLASSID=CLSID:A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C");
        document.write(" CODEBASE=\"http://66.45.99.198/plugin/h263ctrl.cab#version=1,7,0,1\">");
        document.write("<PARAM NAME=\"Url\" VALUE=\"http://66.45.99.198/cgi-bin/video.vam\">");
        document.write("<PARAM NAME=\"VSize\" VALUE=\"CMS\">");
        document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"http://66.45.99.198-966578878\">");
        document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5001\">");
        document.write("<PARAM NAME=\"RemoteID\" VALUE=\"25466\">");
        document.write("<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">");
        document.write("<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"false\">");
        document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
        document.write("</OBJECT>");
      }
      //-->
      </script>
<script type='text/javascript'>
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11834726
http://www.generalstorecafe.com/videocamera.htm

here it is with the error.  Weird that it works fine after oking the warning.
0
 
LVL 5

Accepted Solution

by:
vilia earned 500 total points
ID: 11836124
This works:
        document.write("<OBJECT ID=\"VACtrl\" WIDTH=660 HEIGHT=520");
        document.write(" CLASSID=CLSID:A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C");
        document.write(" CODEBASE=\"http://66.45.99.198:80/plugin/h263ctrl.cab#version=1,7,0,1\">");
        document.write("<PARAM NAME=\"Url\" VALUE=\"http://66.45.99.198/cgi-bin/video.vam\">");
        document.write("<PARAM NAME=\"VSize\" VALUE=\"CMS\">");
        document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"http://66.45.99.198\">");
        document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5001\">");
        //document.write("<PARAM NAME=\"RemoteID\" VALUE=\"25466\">");
        document.write("<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">");
        document.write("<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"true\">");
        document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
        document.write("</OBJECT>");

There are couple chagnes, but puting out:
//document.write("<PARAM NAME=\"RemoteID\" VALUE=\"25466\">");
solved the problem.

comment:
Without documentation I assume RemoteID is some kind of SessionID.
Submiting a wrong one, gets rejection from the camera, but the ActiveX tries again (after click on OK), this time without RemoteID, so it connects.
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11836649
that worked perfectly-
thanks

0
 
LVL 5

Expert Comment

by:vilia
ID: 11837100
Do not forgert security portion. It is possible to change camera's parameters (IP, etc) through unprotected web interface.

/ You own me a cup of coffee from the shop :-)   /
0
 
LVL 1

Author Comment

by:livegirllove
ID: 11837199
yeah im going to set that up next.  Wanted to get it working on the web first.

Anytime on the coffee.  Counter-Culture shade grown the best around.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now