-1

Recently I have finished a PHP project that I have tested on my home computer using WAMP. I dont have any hosting online and would like to make my localhost remotely accessible.

For example, I want to make it possible for someone on the internet to access the website by typing in my IP or whatever.

Effectively I want to make my WAMP local setup remotely accessible. What is the best way of doing this?

Thanks Philip

  • 1
    Exposing a "home computer" to the net without really knowing what your doing is the shortest line from here to pwn3d. That said, you need to configure your router/modem/firewall/CPE to forward Port 80 traffic from it's WAN port to your computer's local IP. – Chris S Oct 26 '10 at 16:26
  • Yes, Chris S is right. It's definitely a security concern to run a PHP web server on your LAN and expose it to the 'net. Web hosting is cheap. It's cheap enough you should definitely give it serious consideration even as a hobbyist. – Aaron Copley Oct 26 '10 at 16:36

4 Answers4

1

Assuming this host connects to the Internet via a typical home router, you will need to forward the WAMP listening port to your internal/LAN IP for this computer. (You will need to refer to your router's documentation for specifics to your make/model.)

WAMP typically listens on port 80, but many ISPs will block inbound port 80 to keep you from hosting a web site at home. Just move it to another port such as 8080 if you have trouble. Your internal/LAN IP can be determined by running ipconfig from the command line.

After port forwarding has been setup, you can direct someone to your site at your external/WAN IP on port 8080. Ex: http://1.2.3.4:8080/

An easy way to determine your external IP is to browse to: http://whatismyip.com.

Aaron Copley
  • 12,525
  • 5
  • 47
  • 68
1
  1. Presumably, you have a firewall blocking access to your home network. Note that this opens up your home network to security issues because you are opening a hole in your firewall. Keep your software up to date and be aware of security issues. You might be better off hosting this website at a hosting provider instead, which can cost less the $10 a month.

  2. Your home router probably receives a dynamic IP address from your ISP's DHCP server. Use a Dynamic DNS to direct a domain name to the IP. Dynamic DNS clients exist for Linksys routers, OpenWRT, Linux and Windows computers.

  3. Open up the firewall on your router or server and allow traffic through port 80 or 443. For security reasons, you probably want to limit access only from the client's IP address or the client's IP range, instead of opening up port 80 or 443 to the entire world.

  4. Use port forwarding to forward port 80 (or 443) to the IP address of the backend server, on port 80 (or 443). Most home routers support port forwarding.

Stefan Lasiewski
  • 23,667
  • 41
  • 132
  • 186
0

I would also add that if you decide to go on with this project, that you consider disabling the ability for people to ping your machine from the outside using a hardware/software firewall. That would reduce your visibility to automated scanners.

I also agree with everybody else that it might be less of a headache if you went with a hosting service instead, especially if you have important information on this machine and/or your home network.

Bourne
  • 1,039
  • 5
  • 18
  • 24
0

We built Forward for usage just like this. Forward gives you a publicly accessible url that you can share with anyone on the internet and it doesn't require you to setup port forwarding or anything like that.

Check it out at https://forwardhq.com/

Disclaimer: I worked on it.