Welcome to WebmasterWorld Guest from 54.196.26.1

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Cannot access server on my own pc but everyone else can

Cannot access server on my own pc but everyone else can

     
11:49 am on May 14, 2009 (gmt 0)

New User

5+ Year Member

joined:May 11, 2009
posts:6
votes: 0


Hi everyone,

I have set up wampserver on a virtual PC. I then opened port 80 on my router and set up a free sudomain with dyndns.

I have asked a few friends to visit the address and they have no problem loading the site, but for some reason, I cant access it from my own pc (host to the virtual PC running WAMP) or any other PC on our local network unless I type in the PC's lan address rather than internet ip address or domain name.

Anyone have any ideas?

1:12 pm on May 14, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Yes, think about what happens when you try to use the server's WAN address or domain name from inside your own network: The request for the WAN address is sent to your router, because it is not within your LAN's subnet range. Then the router can't do anything with that request, because it has already been routed "outgoing" to the Web. There is no other 'agent' to 'turn the request around' and route it back to your router so that it can be port-forwarded back to your server inside your LAN. You are essentially trying to ask your router to make two connections --one outgoing, and another one incoming-- from the same TCP/IP request.

Two solutions that come to mind are to use your 'hosts' files to define yourdomain.com and www.yourdomain.com as 127.0.0.1 on the server itself, and as the server's LAN IP address on the other PCs inside your LAN. This essentially sets up a 'private DNS' for your server within your own network, and has no effect on the DNS used out on the Web. The other solution is to use a proxy out on the Web; It will 'turn around' your requests and send them back to your router using the public DNS system.

Jim

10:20 pm on May 14, 2009 (gmt 0)

New User

5+ Year Member

joined:May 11, 2009
posts:6
votes: 0


Hi Jim.

The weird thing about it all is that it worked fine last night initially. Then it stopped working after a while.

Your explanation makes a lot of sense and I have gone with your solution and defined my domain in my hosts file.

Thanks for the advice!

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members