| shimmyshack 2006-10-25, 1:38 am |
| set your server machines IP to 192.168.1.101 manually
[making it static means that DHCP doesnt change IP on reboot so router
always has same place to forward packets to]
add this line to the hosts (/etc/hosts) file on ALL machines on LAN
which need access to http://mydyndns.com/
192.168.1.101 mydyndns.com
[this is needed on the server machine, so that you can write your html
with links that use the domain name and it instantly known that the
domain name refers to itself. All other machines on the LAN will need
it too, as when they each do their own DNS, they will receive the
PUBLIC ip address, but when they send a request for mydyndns.com to
your public ip, your router will serve them its not found page (try it!
- make a request to http://your_public_ip and see the router error). By
adjusting the hosts file to point this domain name to your LOCAL ip, no
dns service is used when requests come from inside your LAN)
make sure apache2 is bound to 192.168.1.101 and listening on port 80
[this is done by adding
Listen 192.168.1.101:80
to your httpd.conf]
restart apache
on apache box, restart your web browser [to remove old DNS results] and
try to access
http://192.168.1.101/
and
http://mydyndns.com/
if you can see them great.
now try another machine on LAN, using same proceedure
works! good!
---making it work externally...
you have already done the DNS so thats good
make sure router forwards port 80 to 192.168.1.101
from a machine inside your lan, in a web browser connect to a proxy
server, (google for phproxy) and stick the domain name into the proxy's
input field. (you can use a W3C validator for this)
can it reach the files?
the basic problem you were having is that when on your LAN using DNS to
find your server and then requesting pages from your external IP causes
trouble, so you have to override all DNS for internal LAN, while your
external users use the dyndns service as normal.
|