Unable to connect on natted server from a host computer on the same LAN using public IP address
Solution 1:
Remember, when your firewall/router/whatever is doing NATing, the internal box that has a public IP NATed to it doesn't know anything about the NATed address.
So, in order for this to work, your packet has to leave your internal LAN, go out to the external network, then come back in via the firewall/router/whatever that's doing the NATing, and finally be handed to the internal box (which, again, doesn't generally know anything about the NATing).
There are some work-arounds that are possible (see Cisco alias
command, if you're using Cisco), but in general it's not really something you want to do.
This is why most networks that contain internal hosts and externally accessible (public) hosts will maintain separate DNS servers for internal and external hosts. You can setup your external DNS server so that www.example.com points to your external IP, and setup your internal DNS server so that www.example.com point so your internal IP. If you're using BIND, then views
make this quite easy.
Solution 2:
You'll need to use the "alias" command to make this work.
See: http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_tech_note09186a0080094aee.shtml
NB!: The ASDM does not support this command, you have to do it by CLI.