How to setup router so that others could access the webpage

routerwamp

I have a router.
And I want to know how will I be able to access my webpage.

Details:

  • Server: Apache (Installed throughWampserver)
  • Router: TP-LINK TL-WR340G
  • OS: windows 7
  • IP: dynamic

I tried forwarding then virtual servers(In my routers configuration page)
Added port 80. As you can see below:
Also tried port triggering with the same parameters. But still can't access my webpage.
I'm using DYNDNS, so I also tried adding the service, but still no luck in accessing the webpage.I even tried disabling the windows firewall:

alt text

alt text

What IP Address do I really have to enter in the address bar in the browser?I tried the IP Address of the computer and it doesn't work. I tried the domain name I got from dyndns.org and it didn't work. How am I supposed to access my site outside the network. (I can't even access it inside, except when I enter localhost or 127.0.0.1 on my browser)
And by the way if I hadn't already said it above, I can access my webpage perfectly if I'm not behind my router

Best Answer

Looking at that screenshot, I think you've messed up the NAT config, your windows pc wouldn't have ip 192.168.1.1, that's most likely your router. (Although I guess the router could be 192.168.1.0 -- does 192.168.1.1 work in your browser?)

IP address under "virtual servers" should be your pc's IP. You'll want to check your router's DHCP settings, and if possible make it always assign the same IP to your machine. (Failing that, switch to static IPs, but I'm not going into configuring that..)


Do note that many routers won't let you access services on the external IP from inside your lan, as a 'security feature'. Try checking if port 80 is open from the outside, e.g. by one of those web sites providing port scanning.

If the port is actually listening, you'll either have to enable NAT loopback in your router, set up a dns server on your local network, or simply add the hostname and internal ip to your hosts file. (Or just stick with using "localhost" from inside the lan)

See http://opensimulator.org/wiki/NAT_Loopback_Routers for an intro to NAT loopback configuration on various routers.

Related Question