HOSTS question....i think

 
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues
View previous topic :: View next topic  
Author Message
zace
-


Joined: 15 Jan 2004
Posts: 12

PostPosted: Mon Jan 26, 2004 12:02 pm    Post subject: HOSTS question....i think Reply with quote

I have set up Aprelium with php-nuke on one of my PCs.

I have my server running on 10.1.1.12. Port 80 maps from my external ip address to my server. All works well from outside, people can view the site, etc

HOW can i change my internal network to work correctly as i cannot access my own external ipaddress from inside ?
My main machine is 10.1.1.21
I presume i have to add an entry into my HOSTS to allow me to check the IP address out from outside ? But it doesnt work.
I have entered 10.1.1.12 123.4.5.6 (where 123.4.5.6 is my external ip address) but this does not work !
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Mon Jan 26, 2004 1:21 pm    Post subject: Reply with quote

You don't want to enter your external IP in the hosts file, you want to enter the domain name / dyndns name / whatever you're using to contact your server. The goal of changing the hosts file on the PCs on your LAN is to enable them to connect to your main server PC by name, without the traffic ever going out onto the internet - routers generally cannot handle sending traffic back directly to themselves.

So, for example - your server is at 10.1.1.12

In the hosts file of your main machine (10.1.1.21) you add

10.1.1.12 www.yourdomain.com

Now when you type www.yourdomain.com in IE on your main machine, it goes straight to 10.1.1.12 without resolving the domain name via DNS and trying to send traffic out over the router.
Back to top View user's profile Send private message
zace
-


Joined: 15 Jan 2004
Posts: 12

PostPosted: Mon Jan 26, 2004 5:34 pm    Post subject: hmm - me no understand Reply with quote

I think i am missing a piece of the puzzle.

I have a domain - but i am paying someone to host this (not a lot).

I have now added a index.htm that redirects that URL to my IP address... the request arrives at my smoothwall PC and is routed internally to 10.1.1.12.

I have set the page up on my 'server' - i presume i should not hardcode any addresses, merely use indirect addressing.

I have added in to my HOSTS and i can now visit the page !!!


WOOT it works - thanks - i think the problem was that i was missing the URL


OK a follow up question if i may - does anyone know how I dynamically host the ip address from on the REAL server i am paying for?
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Mon Jan 26, 2004 5:55 pm    Post subject: Reply with quote

Do you mean you want to constantly update the IP for your local server in you have stored in the index.htm on the hosted server?

There's various little programs designed to upload your IP to a specific directory on a server, you could then parse that file with PHP. In the long run, you might find it more useful to create an account with DynDNS and download a free tool to update their DNS with your IP when it changes.

e.g you get zace.ath.cx as a free account from DynDNS and setup the update client. The update client checks if your IP has changed every x minutes and automatically updates the DynDNS record. zace.ath.cx would always point to your non hosted server, so you could just use http://zace.ath.cx in your index.htm.

It also gives you an easier way of setting up ftp/mail/anything else you fancy, and accessing your machine from other locations since all you have to remember is the hostname you've signed up for.
Back to top View user's profile Send private message
regalia
-


Joined: 21 Oct 2004
Posts: 2

PostPosted: Sat Dec 25, 2004 9:21 pm    Post subject: Reply with quote

Anonymoose wrote:
Do you mean you want to constantly update the IP for your local server in you have stored in the index.htm on the hosted server?

There's various little programs designed to upload your IP to a specific directory on a server, you could then parse that file with PHP. In the long run, you might find it more useful to create an account with DynDNS and download a free tool to update their DNS with your IP when it changes.

e.g you get zace.ath.cx as a free account from DynDNS and setup the update client. The update client checks if your IP has changed every x minutes and automatically updates the DynDNS record. zace.ath.cx would always point to your non hosted server, so you could just use http://zace.ath.cx in your index.htm.

It also gives you an easier way of setting up ftp/mail/anything else you fancy, and accessing your machine from other locations since all you have to remember is the hostname you've signed up for.


Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group