URL re-writing for local vs internet access

Soldato
Joined
18 Jan 2006
Posts
3,178
Location
Norwich
I'm sure there's something simple I'm missing here, can't think on how to do this-
I've got an incredibly simple page of links, which can either be accessed from the local network, or over the internet (Unfortunately its a dynamic IP, otherwise things would be much simpler) The problem is that these links need to incorporate the port number, & protocol like this:
Code:
http://192.168.2.250:10000
https://192.168.2.250:10002
The port works both on the external DynDNS URL that I'm currently using (Mildly related- Anyone got a way to point a spare domain/ subdomain in the same way, using a Tomato WRT54GS?), or on the local IP. I'd rather not try to use the external URL, as this places a reliance on external DNS, but have the page dynamically re-write itself dependant on where its being accessed from.

Cheers

-Leezer-
 
Not quite following your reasoning ;)
I've got the my main public server structure (Apache, PHP5 SQL etc) running various bits and bobs to start with, this runs on port 80 as standard. Within this, I've added a separate password protected area with the management functions etc. linked from a single HTML page. These form the links as above, for which the port number & protocol may vary, depending on what is being linked to-
This stuff is normally web interfaces for various bits of kit (Transmission BT, NZB server, BackupPC etc), & as such has no interaction with the primary Apache server, but rather runs their own backend on an entirely separate port. I've also got SSH/ VNC links & other bits and peices, all of which have no fixed port.

Subdomain/ domain wise, I'm fully aware that I can point it to a specific IP, my trouble is that the IP in question in dynamic. (Home internet connection!) I can use DynDNS or any one of the similar services, but for this I either have to use their subdomain or pay to use my own, which I'd like to avoid.


Edit: Another thought- What would be the implications (Security &/ or otherwise) of using a Perl script to determine whether the IP is local & then serve a page as appropriate?

Cheers

-Leezer-
 
Last edited:
Back
Top Bottom