I have a laptop with win 8. I can access localhost locally but when I type the public IP address then it doesn't work. I tried changing Apache to port 81 and still the same result.

I use a HSDPA modem with a SIM card to connect to the online. No router nor this is connected to any LAN

Dani AI

Generated

Short summary and targeted checks based on the thread: can reach WAMP locally but not from the internet while on an HSDPA modem. ’s point about confirming the externally visible IP and ’s note about carrier-side blocking are both relevant. The following checklist covers the technical causes that commonly produce this symptom and practical workarounds.

Common local checks (Apache / binding / listening)

  • Verify Apache is listening on all interfaces, not just the loopback address. On Windows, run:

    netstat -aon | findstr :80

    Look for a line like TCP 0.0.0.0:80 ... LISTENING (global) vs 127.0.0.1:80 (local only). If Apache is bound to loopback, change the Listen line in httpd.conf to bind to all addresses (or the specific interface):

    Listen 0.0.0.0:81
    <VirtualHost *:81>
        DocumentRoot "c:/wamp/www"
        ServerName localhost
    </VirtualHost>
  • Restart Apache after edits and validate configuration (httpd -t or using the WAMP control panel).

Firewall, modem and carrier NAT

  • Ensure Windows Firewall has an inbound rule allowing the Apache executable or the TCP port used (example to add a rule for port 81):

    netsh advfirewall firewall add rule name="Apache HTTP" dir=in action=allow protocol=TCP localport=81
  • Compare the WAN/IP shown on the modem’s status page with the IP returned by an external “what is my IP” lookup. If they differ or the WAN IP is in a private/CGNAT range (e.g. 100.64.0.0/10, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) then inbound connections won’t reach the laptop unless the carrier provides a public IP or port mappings.

Workarounds and cautions

  • If the carrier blocks inbound ports or uses CGNAT, options include using a VPS + reverse SSH tunnel (ssh -R 8080:localhost:80 user@vps) or a tunneling service (ngrok/localtunnel) to expose the site. For production use, run public services on a hosted server rather than a laptop on a mobile link. Exposing a development laptop to the internet increases attack surface—keep software patched and restrict access where possible.

Recommended Answers

All 2 Replies

Hello,

The way I read your question I am not sure if you have a web site on your laptop you are trying to access or if you are just trying to get to any site on the internet.

1.) When you say you use the public IP address are you referring to the address given by the laptop on your local network or you actual external IP address. Try going to the following website to find out what address the internet sees you at:

What is my Ip address

2.) Apache should be running on port 80 so that you don't have to add the port to your browser and port 80 would be open on your Windows firewall if if you can get through to the site at localhost. If you are trying to connect to your site on your laptop.

3.) What do you mean by the statement "I can access localhost locally but when I type the public IP address then it doesn't work." Are you referring to typring that in to your browser or a command line or what. Are you able to get to the internet at all or is that what you are trying to configure?

Your wireless provider may not allow unsolicited inbound traffic to your HSDPA device.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.