0

Hi there, I'm currently hosting my website on my own computer, and I'm using http://www.no-ip.com to allow me to do so as I have a dynamic IP. (updates the pointers, when my IP changes.. for the domain name).
I have now set up my webcamera to have a have stream on it, the camera is in port 8081, and when I type internally 192.168.1.150:8081; (internal is static @ .150 for my PC), I get to view my web cam.
I would like to also put this through my domain name and a link on my webpage, for this... although when linking it in the html file, I would need to put my current ip and port (i.e. 25.54.65.255:8081); and this does work when outside of the network, although I would like it so I don't have to hard code my IP, because as I said, it's dynamic!

How could I get around this? would http://www.websitedomain.com:8081 work?
If so, how would I get this to work, because it's currently not working!

Before you ask, Yes Port 80 and Port 8081 are both forwarded. As I said, the camera stream does work when connecting with my ip and port, although I just want a solution to how to link to this port "dynamic.ip.goes.here:8081"; without having to change the IP in the html file, every time my ip changes.

If I'm not describing it well, please let me know and I'll see if I can do a better job at it!
Many thanks, Toby.

Edited by Tobyjug2222

3
Contributors
6
Replies
23
Views
4 Years
Discussion Span
Last Post by JorgeM
2

You already indicated you are using no-IP.com. I haven't used that service, but if it provides you with a free hostname and dynamic DNS services then you should be good to go.

In your HTML page, you would reference the no-IP hostname:8081

0

Or an alternative solution would be to hit a 3rd party service such as "What's my IP" using something along the lines of:

file_get_contents("http://bot.whatismyipaddress.com");

This shall give you the server's actual WAN IP.

Edited by Octet

0

Okay thanks! Since I've already got the no-IP Dynamic DNS Service set up, I'll be using JorgeM's solution. Is there any way I can use "Camera.DomainNameHere.com" to go to DomainnameHere.com:8081?
Or is that not possible, and I would have to do DomainNameHere.com/Camera, to take me to port 8081.

Thanks again, AHarrisGsy & JorgeM

Edited by Tobyjug2222

2

If you own the domain name, you can just create an alias record in yiur DNs zone called camera and point it to your no-IP.com hostname. For example...

Camera.myDomain.com --> myAccount.no-IPdomain.com (or whatever hostname they give you)

You then can access your camera like this::

Http://Camera.myDomain.com:8081

If you don't have a domain name and you only have a no-IP domain name, you can only have the hostname camera if no-IP allows custom records to be created for the host and/domain name they assign you.

You can also do http://no-ipDomain.com/camera, but this will require you in your website code to perform a redirect to http://no-IPdomain.com:8081.

You can also do camera.yourDomain.com and on your website using .htaccess/URL Rewriting, redirect the user to http://no-IPDomain.com:8081

Hope this helps... If not, I clarify it in more detail.

Edited by JorgeM

0

Hi JorgeM, Thanks so much for the indepth responce.
I understand what you're saying and so far I have http://DomainName.com:8081 working, although I'd like it to be a little neater than that!

I seem to have 2 options,
1] (the least prefered method), Allow the user to type http://Camera.DomainName.com and redirect them to http://DomainName.com:8081
2] (the more prefered method), Allow the user to type http://Camera.DomainName.com [or http://DomainName.com/Camera (although I think this uses a webpage, where I am using YawCam to display it, and I don't actually place a webpage anywhere)] and this URL will not change, but will allow them to see http://DomainName.com:8081 (or MyIp:8081) <-- which are both the same thing

Is there any way to allow Option [2] to happen?

Thanks again JorgeM.

0

So I am under the impression that you already have a website hosted on a computer in your network as per your description in your first post. I'm not concerned about the camera web services.

If you are running a webserver, you could host an additional website that is listening for the host header "camera.domain.com". The only purpose of this site is to redirect the user to port 8081.

If you don't have a webserver, another alternative is to configure your router to map port 80 --> 8081. This would allow you to use the URL without defining the port because the router will do that work for you. However this is only applicable if port 80 is free to use.

For option 2 I don't see any technical problems other than going through the setup.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.