Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Apache server at home and a router configured to assign a static IP address to that server. I also have the ports forwarded correctly for Apache and SSH. I can access the server with my public IP:Port from outside my home network. However, from within my home network, I am unable to connect.

Why is this and how can I fix it?

share|improve this question
What router are you using? – yosh m Feb 6 '12 at 21:15
d-link dsl2640B – Sandro Dzneladze Feb 7 '12 at 10:03
are you trying to connect from within your home network using the publicIP:publicport or are you trying to access the server directly using staticLocalIP:localPort? – yosh m Feb 7 '12 at 22:28
I'm trying from home network using publicIP:publicport, and I'm wondering why it doesn't work. As I state in OP from other network I've no problems. I want to setup test sites, and would love to have 1 url for working from within network and from outside. – Sandro Dzneladze Feb 8 '12 at 8:11
up vote 2 down vote accepted

I have a different model of D-Link. I checked your manual at In there it appears that you have Port Forwarding option but not Virtual Server option. Is that correct? OTOH, I also looked at the D-Link site and see a manual at - where it does describe a Virtual Server function - so I am not sure which version of the router you have.

In any case, with Port Forwarding, you have to use the same port number both publicly and locally whereas with Virtual Server you can map a public port to a different private port.

If you are using port forwarding, in the manual for your router it says (emphasis added):

Use the PORT FORWARDING window to open ports in your router and re-direct data through those ports to a single PC on your network (WAN-to-LAN traffic). The Port Forwarding function allows remote users to access services on your LAN such as FTP for file transfers or SMTP and POP3 for e-mail. The DSL-2640B will accept remote requests for these services at your Global IP Address, using the specified TCP or UDP protocol and port number, and then redirect these requests to the server on your LAN with the LAN IP address you specify.

As you can see from the parts I bolded, the manual only talks about providing the port forwarding for remote WAN-to-LAN traffic - while you are trying to use it for LAN-to-LAN. So I suspect that what you want to do is simply not supported with vanilla port forwarding. Have you asked the D-Link technical support about this issue?

Now, if you have Virtual Server, then you may have a setup similar to what I have. I have defined several ports to route to local machines - in only one case did I map a public port to a different private port. When I use the publicIP:publicPort and the public & private ports are the same, I have no problem using it both locally and externally. However, when the ports are different - I also have been having a problem, but I have not yet tracked it down.

So my first suggestion is to try using the Virtual Server option and use the same port internally & externally - see if that helps. If you don't have the Virtual Server option, you can try turning to D-Link's support & see if they can advise you how to resolve your problem using vanilla port forwarding.

Good luck, Yosh

share|improve this answer
Hey, thank you for in-depth comment. Unfortunately my router doesn't have VirtualServer option. – Sandro Dzneladze Feb 10 '12 at 13:36
Check with D-Link - there may be a firmware upgrade that gives you the Virtual Server option. Or they may be able to suggest an alternate way to get what you are looking for. Good luck! – yosh m Feb 11 '12 at 19:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .