jabaroon 0 Posted May 14, 2009 Hi All, Another question for anyone out there that has an AVTech or even better, an AVC875 model. I have it setup to allow remote connections from the local network so that you can login and view / control the cameras. Everything works fine normally on the local network. However, if I want to make it available to the outside world, I need to port forward from my gateway to the DVR. Simple you would think....but here's were things get whacky! Once I hit the login page, I enter username and password as normal. However immediatley I get an error response back from the DVR: "home.cgi was not found on this server" All of the paths and configurations are correct on the client side. Even inspecting the request from the browser through a proxy, I can clearly see that it is requesting the correct resource (eg: it exists). Therefore I conclude that it is the home.cgi script itself that is programatically generating the error response......but why?!?! Anyone else got any similar experiences or better still, a solution!! Cheers, Jab Share this post Link to post Share on other sites
scorpion 0 Posted May 15, 2009 Are you using Video Server E, or are you using Video Viewer? Share this post Link to post Share on other sites
jabaroon 0 Posted May 15, 2009 Hi scorpion, I am using the inbuilt web server into the DVR, eg: http://ip-address-of-my-dvr/ Title of the browser reads --- VIDEO WEB SERVER --- I also use Video Server E, but in this case, I am trying to get the video web server mentioned above working from locations not on the same lan segment. As mentioned, its almost like the home.cgi script internally in the DVR webserver either has a bug in it or its deliberatley doing some sort of detection and rejecting the request (but cant imagine why). I did attempt to upload the latest firmware (ref: my other thread!), but also tried to see if I could extract the HTML.BIN file to examine the HTML / CGI to try and figure out what it might be doing! Havent managed to extract it successfully yet, but can see application.jar inside!! Any ideas?! Cheers, Jab Share this post Link to post Share on other sites
scorpion 0 Posted May 15, 2009 Hi scorpion, I am using the inbuilt web server into the DVR, eg:http://ip-address-of-my-dvr/ Title of the browser reads --- VIDEO WEB SERVER --- I also use Video Server E, but in this case, I am trying to get the video web server mentioned above working from locations not on the same lan segment. As mentioned, its almost like the home.cgi script internally in the DVR webserver either has a bug in it or its deliberatley doing some sort of detection and rejecting the request (but cant imagine why). I did attempt to upload the latest firmware (ref: my other thread!), but also tried to see if I could extract the HTML.BIN file to examine the HTML / CGI to try and figure out what it might be doing! Havent managed to extract it successfully yet, but can see application.jar inside!! Any ideas?! Cheers, Jab I would have to be there on site in order to understand the problem. If you can see the video on the local LAN then this tells me the DVR is working just fine, and the Cat 5 cable to the router is fine. Have you done portforward on your router? What port number are you using? I am thinking that you need to delete Video Server E, and reload it. If this does not work then you need to delete it again, and then turn your computer off twice, and then when it comes back up you will need to down load another copy of Video Server E, and assume that your disk is corrupt. What do you think? Share this post Link to post Share on other sites
jabaroon 0 Posted May 18, 2009 Hi Scorpion, Sorry for the delay in replying. I was away for a few days. I now believe that I have the source of the problem. When I try to access the DVR's in-built web-server from a location off the subnet where the DVR is located (or more specficially, from a NAT'd location on the internet), I get the following error after trying to login to the DVR: "The requested URL was not found on this server" This is a response from the DVR web-server, NOT from anything else in the traffic loop. I now believe that the reason for this is as follows: In the HTML for the login page of the DVR, there is a hidden form parameter called: On the submit action for the login event, the following javascript is run: function apply() { var url; ur1 = window.document.URL; form1.url.value = ur1; document.form1.submit(); } It takes the browser URL [Lets call this the EXTERNAL url] and passes this as a parameter to the CGI webserver in form1.url Presumably the CGI tries to connect to this URL or uses this as a relative path somehow. This is all fine if you are on the INTERNAL network as the DVR box will be able to access the URL typed into the browser (eg: 192.168.1.xxx). However, if you are trying to login from an external location, the URL in your browser will look something more like: www.mycameras.com/... This EXTERNAL url will not necessairly be accessible behind a NAT firewall where the DVR box is located! In essence, if you are NAT'ing your connection and/or more specifically doing any URL re-writing along the way at the apache layer, your AVTech DVR will have problems it would appear. Possible Solutions - Need advice here! 1) Download a copy of application.jar and write custom HTML/login pages to bypass the dodgey ones mentioned above. Anyone have any notes on parameters to pass to it etc? (to save me decompiling!) 2) Firmware upgrade?...would this solve it? 3) Is it possible to get a copy of the CGI script that is actually installed on the webserver within the DVR? That way I could confirm my theory [albeit that I am fairly certain!] 4) Is it possible to make my own firmware modifications. Specifically to the HTML.BIN file. Does anyone know how to explode the .BIN and then re-package it? Using a Hex editor, I can see a war/jar inside with all of the HTML that is needed! If I knew how to explode the BIN and repackage, I could create my own patched version of the HTML components that would correct the issue! Thoughts? THanks, Jab Share this post Link to post Share on other sites
scorpion 0 Posted May 19, 2009 http://scorpiontheater.com/url.aspx Share this post Link to post Share on other sites