I can connect to server using local IP ( address using putty. but not able to connect using WAN ip address..?

  • 1
    It is probably your firewall... – Questionmark Apr 27 '15 at 13:54

There are three possibilities that spring to mind.

  1. Your firewall isn't configured to permit outbound connections to the Internet from your client.

  2. Your firewall isn't configured to permit inbound connections from the Internet to your server.

  3. Your NAT/firewall is incapable of hairpin connections. A hairpin is the name given to the scenario when you start on a LAN host and try to connect to a WAN address served by the same firewall that serves your outbound session:

           [PC]  ------->  [            ]  ----+
    (LAN)                  [NAT/Firewall]      |  (WAN)
           [Server]  <---  [            ]  <---+

These situations can be identified by attempting to connect firstly to a different server, and then secondly to the WAN port from a system that is outside the LAN on which the Server is located. (If the second connection succeeds then the NAT/Firewall is configured to permit inbound connections and it's therefore a hairpin issue.)

  • I thinks I fall in hairpin condition. Actually my PC is in LAN ( My PC public IP is for e.g (122.x.x.x) and our server LAN IP is and WAN IP is (180.x.x.x). When I connect to server using my PC LAN IP then I can connect but when I connect to server using WAN(180.x.x.x) using same PC I can not connect. – Developer Desk Apr 27 '15 at 15:29

You have to get into the configuration of the equipment(s) (router / NAT / firewall) between LAN and WAN, and map the incoming port on the WAN side to the address & port of the server on the LAN side.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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