buster
October 1st, 2007, 12:36
Not sure where to post this question, so please feel free to move it :smile:


I have an Axis Camera (built in httpd but no sshd) that I wish to view remotely from my work. However, I do not wish to make it public access! I thought the following setup using SSH tunneling may have provided a possible solution:

_________________________vr0______vr1 ________vr0______vr1
Work PC----Internet---------Bridge------------------ServerZ----------Axis Camera
_________________________________________________s shd[25501]
_________________________________________________h ttpd[25502]

At the moment I am testing only (at home) with following configuration:

WorkPC (WindowsXP) IP 192.168.190.1.
Using Putty a SSH connection to 192.168.190.249:25501 is established
with the following settings to tunnel->listen on 127.0.0.1:30000 and forward to 192.168.190.249:25502

Bridge (OpenBSD) vr0 only passes in TCP traffic to port 25501 (using pf).

ServerZ (OpenBSD) vr0 = 192.168.190.249
vr1 = 192.168.0.249
SSHD listening on 25501
HTTPD listening on 25502
net.inet.ip.forwarding=1

Axis interface IP = 192.168.0.90 (G/W 192.168.0.249)

The Axis camera provides a Javascript which you can insert into a web page, so that the camera can be viewed. I copied the script into ServerZ's /var/www/htdocs/index.html.

From WorkPC I started a SSH connection to ServerZ and then from Internet Explorer openned page: http://127.0.0.1:30000. As expected I could now view Index.html (from ServerZ httpd). Unfortunately, the camera display was missing (empty box -> No Video).

I then changed pf config on Bridge to allow all traffic to pass in and out. Now when I visit Index.html the camera view is seen.

I think I found the problem, the Axis code includes a Variable: var BaseURL = "http://192.168.0.90". So from WorkPC, when I open the Index.html webpage it is fetched over the SSH connection as I require (via127.0.0.1:30000), but the reference in Index.html to 192.168.0.90 obviosuly isn't forwarded - so no camera view. Hence, when the bridge is open, WorkPC can now simply reach 192.168.0.90 and the camera view is present.

In the Index.html file, I would need to somehow have the script reference "http://127.0.0.1:30000/192.168.0.90". Obviously, I know that is not possible but I just want to try to illustrate the problem.

Can anyone suggest a way I can force the use of the SSH tunnel from WorkPC to collect camera view in web page. Or else suggest some other method. I'm not really sure if this is an IE problem, SSH problem, HTTP problem or (most probably) just a bad idea! :icon_smil but any help/suggestions would be gratefully received!

buster
October 1st, 2007, 15:05
Solved the problem, I was being stupid as usual :silly:.
Please ignore the thread :icon_smil

Kernel_Killer
October 1st, 2007, 15:54
Great post. Although minor things are usually overlooked, at least this can provide a troubleshooting tip for the rest of us when we do the same.

buster
October 2nd, 2007, 11:20
Great post. Although minor things are usually overlooked, at least this can provide a troubleshooting tip for the rest of us when we do the same.

Thanks, I don't do this much but enjoy messing around :smile:. I had over complicated matters, there was no need to even enable httpd on ServerZ. I just refer the ssh tunnel directly to the Axis Camera IP (which has its own built in web server). If it helps anyone else, I found the following link useful: http://souptonuts.sourceforge.net/sshtips.htm

Cheers:icon_smil

Kernel_Killer
October 2nd, 2007, 17:47
I had over complicated matters, there was no need to even enable httpd on ServerZ.

yes, I know exactly how that is. Strog, feel free to cringe or cry. Whichever feels better. :biggrin:

Strog
October 3rd, 2007, 12:29
yes, I know exactly how that is. Strog, feel free to cringe or cry. Whichever feels better. :biggrin:

I'd like to have the choice to laugh or cry. I'm laughing now. :icon_mrgr

Kernel_Killer
October 4th, 2007, 13:19
I'm controlling the almost all of the Soekris with custom PHP apps. Laugh or cry? :biggrin: