Making Wampserver Accessible Over the Internet

Written By Steven Martin

Requirements

PC with Microsoft Windows XP

A Version of Wampserver

An Internet Connection

This manual is written for Windows XP. Other versions of windows will follow a similar setup but some of the menus are located differently.


Making a server accessible to the web is done by making a route from your server to the internet where your server can then serve pages to the computer requesting them. If you have not managed to get your server working locally on your own PC then this manual will be of no help to you. This manual is specifically for making an already locally working server accessible outside of the local network.



The “Simple” Test


Before we set up anything permanent we will try just getting a page to display using your external IP in your browser. There are a number of steps that need to be made. These are…








Turning Wampserver Online


This is a simple step. Your Wampserver should be already started and the icon should be a white half circle with a black padlock in the centre as shown

Your browser may not support display of this image.



Just left click your Wampserver tray icon and left click the “Put Online”


Your browser may not support display of this image.


The Wamp tray icon should change from

Your browser may not support display of this image.
to
Your browser may not support display of this image.


Your Wampserver is now ready to access the internet.



Internal IP Setup


Every computer connected to your router is given an IP address.

There are two type of IP addresses. Dynamic IP’s and Static IP’s


A Dynamic IP is generated by the router when a computer is connected. It is given then next available IP address. This is usually fine for most people accessing the internet and is the default in Windows XP and newer versions.



A Static IP works slightly differently. The computer tries to connect to the router and tells the router that it wants a specific IP Address. This means that you can always rely on the IP Address being the same and this is needed for Wampserver to work.



To switch to a static IP you need to follow these steps.


Find the IP address you’re using now

Find your Default Gateway Address

Find your Subnet Mask Address

Find Your DNS Addresses



Click Windows Start Button

Your browser may not support display of this image.



Click “Run…” on the Start Menu

Your browser may not support display of this image.


This Dialog box will appear


Type in “cmd” and click “OK”


Your browser may not support display of this image.


NOTE:- on some older versions of Windows “command” is used instead of “cmd”


A Black DOS dialog box will appear


Type in “ipconfig” and press Enter


Your browser may not support display of this image.


Your browser may not support display of this image.



Here you will see your IP, Subnet mask and Default Gateway Addresses


Keep note of these values.




Next you will need your DNS Addresses

These are got on the Routers Internal Interactive page



Every Router varies but most use the Default Gateway Address to access the setup of your router



Usually the Default Gateway is one of the following

192.168.0.1

192.168.0.254

192.168.1.1

192.168.1.254


Use your Default Gateway address you found on Page 4.


Open your Web browser and key in http://your.default.gateway. address


For this example it would be http://192.168.1.254







For this example I am using a Netopia 3347w Router

Your browser may not support display of this image.






On the Home Page of the Router you can see the


Primary DNS 213.94.190.194

Secondary DNS 213.94.190.236



Keep note of these values. In different routers these may be stored in different places but they shouldn’t be too difficult to find. If you can’t find them then call your ISP and ask them.




If you can’t obtain them, don’t worry, some routers will allow you to use your Default Gateway Address for these values.



Setting up Static IP





Next we will setup Windows to connect to the router with

a static IP using the values attained above.




Whether your using LAN or WLAN right click on your

Internet connection on the taskbar

Your browser may not support display of this image.




And click “Open Network Connections”


Your browser may not support display of this image.








A Window appears showing your available connections



Your browser may not support display of this image.




Right click the connection you’re using and click on “Properties”




Highlight “Internet Protocol (TCP/IP)” and click “Properties” below it


Your browser may not support display of this image.





Select the radio button “Use the following IP address”


Fill in YOUR details that you have kept note of and then press “OK”.

Then press “Close” on the first dialog box.



Your browser may not support display of this image.





Now right click on which ever internet connection tray icon

Your browser may not support display of this image.
you have and click repair.


A dialog box will appear showing your IP Address being renewed amongst other things.


Now you have a static IP Address. Even when you restart your router the same IP Address will be assigned to the PC with Wampserver on it.







Setting up the Router


By default the Internet uses port 80 to send all its information around, Some ISP’s block you from using port 80 to stop you from setting up a web server. To work around this you can use a different port to send information to your router and then have your router change that into port 80 by using the Port Forwarding function.


If you know that your ISP does not block port 80 then you can use it.

Either way, you need to set up port forwarding to forward the information on to your computer with Wampsever installed.


Port forwarding is also known as pinholing as you make a tiny hole in your routers firewall to let the server send and receive information.




Again looking at the Netopia 3347w Router we select Pinholes on the menu



Your browser may not support display of this image.



The dialog box below will appear


Your browser may not support display of this image.




Enter the information above. If your ISP does not block port 80 then you can fill 80 into External Port Range Start and End otherwise use another port such as 8080 shown above.



Make sure the IP Address you fill in is the IP Address of your PC with Wampserver installed.



Then Save it and Restart the Router.






Please follow your Routers manual to do this if it differs greatly from above.




NOTE :- IF YOU CHANGED THE PORT THAT APACHE LISTENS ON THEN FILL THIS PORT INTO THE “INTERNAL PORT” IN YOUR PORT FORWARDING SETUP.BY DEFAULT APACHE LISTENS ON PORT 80




Testing the Connection


Now that you have your port forward set up and you’re local static IP you can check to see if it is working.


Find out what your external IP is by going to http://whatsmyip.org/



Open your browser and go to http://your-external-ip:8080


For this example it would be http://86.42.83.92:8080



The index page in your c:/wamp/www/ folder should be displayed if you are successful.



If you get a “Page cannot be display error” then you have most

likely mistyped something along the way



If you get a “The Server timed out error” then the router is being reached

but it is not being passed on correctly to the server. Possibly your port forward is not correct or

you have made changes to apache other than the default settings.




NOTE :

IF YOU HAVE AN EXTERNAL DYNAMIC IP FROM YOUR ISP THEN IT WILL CHANGE EACH TIME YOU RESTART YOUR ROUTER





AT ALL TIMES MAKE SURE YOUR WAMP SERVER IS “ONLINE”
Your browser may not support display of this image.

AND MAKE SURE YOUR WEBPAGE IS STILL AVAILABLE ON http://localhost









What To Do Next…


Hopefully now that you’ve got your server working from your external IP what do you do next?



Well you may have noticed that if you restart your router your IP Address changes if you don’t have a static IP from your ISP. This is not much use as you can never give someone a URL that will always work. And having to put your port number on the end is unattractive.




So what can you do?



You could deal with it if you are going to use it rarely and only for yourself.


You could call your ISP and purchase a static IP and get them to open port 80 for you.


You could use a Port Redirection Program such as NO-IP or DYNDNS





The best end result will cost you money, and sometimes lots of it. So for many people NO-IP seems to be the best solution. http://no-ip.com offers you a port 80 redirection and a URL from their list of URLS for free. In return they put a small 1cm banner along the bottom of your webpage.



Your browser may not support display of this image.



So now all you need to key in is your URL such as http://myserver.no-ip.com and the user will be automatically be redirected to http://your-ip-address:8080 . They even mask your URL so the user only sees the tidy URL. Of course for a small fee (€6.37) they will remove the Ad Banner at the bottom of the page.



http://dyndns.com also supply a similar server but personally it is more difficult to set up.




Since I think NO-IP will suit most people’s needs I will show how to go about setting this up





Setting up an External “Static IP” With NO-IP


To setup this you need to:


Create a free account with no-ip

Setup the port 80 redirection

Download and Install the Auto Updater Software

Test the new URL




First thing to do is to get onto http://www.no-ip.com/newUser. php and sign your self up for the free account. They will send you a confirmation email which you click the confirming link.



Sign in to the website.



Your browser may not support display of this image.





Your browser may not support display of this image.



Select “Add” on the menu on the left of the page.





This form appears on the right


Your browser may not support display of this image.






Once filled in then click the button at the bottom “Create Port Redirect”








Next Download the small IP auto-updater software found at

http://www.no-ip.com/ downloads.php?page=win





This keeps checking your IP address and when it changes it updates no-ip’s record so users are always directed to the right URL.




Install this software by double clicking the installer icon and following the simple prompts

Your browser may not support display of this image.






Once installed this dialog box will be displayed

Fill in the username and password that you used to make your no-ip account


Then press “Ok”


Your browser may not support display of this image.












Your browser may not support display of this image.



Then the main Dialog box will be displayed. This will be accessible at anytime by double clicking the no-ip tray icon.


In a couple of seconds it will find your IP Address and retrieve your hosts from the website.


Tick the box beside your hostname so that it will keep updating your IP Address.


Your browser may not support display of this image.



Then you can close this box.











Testing Your New URL


Now just open your Web browser and go to http://yourhostname.no-ip.org and your page should be displayed.





Troubleshooting



If you still can’t manage to get your Wampserver working over the Internet then send me an email to info@pampserver.com

Stevenmartin99@gmail.com