Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from serverfault.com Sep 30 '10 at 16:07

This question came from our site for professional system and network administrators.

5 Answers 5

up vote 4 down vote accepted

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.

share|improve this answer
    
If I put the computer's current ip address. I get an error adding the address. It said that The IP address is not in the same subnet with the LAN. –  soul Sep 28 '10 at 12:28
    
What if its not listening?It said that its not responding to port 80 –  soul Sep 28 '10 at 12:30
    
If your ip was on a different subnet, you probably wouldn't have inet access at all..? –  eevar Sep 29 '10 at 13:26

Check with your ISP. Many block incoming port 80... and not with bad reason.

share|improve this answer
    
I can access my webpage perfectly when I'm not behind the router –  soul Sep 26 '10 at 8:05
3  
But when you're behind your router, the packets are not transiting your ISP's network. –  Vatine Sep 26 '10 at 9:03

To test whether you can reach port 80 from outside, use an online port scanner on you own WAN IP address. The WAN IP address is the IP address your provider assigns to your router. Usually most online port scanner will help you with this. Or look it up with your router (click on Status or System Tools).

Google for "online port scanner" or just use this one: http://www.t1shopper.com/tools/port-scan/

Don't scan all port numbers, just scan port 80. Experiment with your configuration till the port scanner tells you port 80 is open. It might be possible that you provider blocks port 80 by default. You can phone them and ask them to open port 80, or change your provider.

share|improve this answer

It sounds like your apache is only listening on localhost. Check the Listen statement in httpd.conf. Ensure it says Listen 80 and not Listen localhost:80 or similar.

Once you can access your apache via 192.168.1.1:80 then the port forwarding from your router should also work.

share|improve this answer
    
its listen 80 by default.Still wont work –  soul Sep 26 '10 at 8:22
    
Are you sure that your host's IP address is 192.168.1.1 ? –  Iain Sep 26 '10 at 10:30

Your question is confusing at best.

"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)"

So you can't access the webpage from http://192.168.1.1, but localhost works fine?

"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"

So you can access your webpage from http://192.168.1.1?

What is the IP address of your router and webserver computer?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.