We help IT Professionals succeed at work.

How to host the website in WAN?

Hi all,
I have developed my site with ASP.NET and SQL Server 2008. I wanna host my website in WAN?  ..How can I achieve this task?...Currently people can access my site in LAN network.
Where all the computers are behind one router including mine. I have tested on WAN network to access my site by putting the IP address  at front but its saying Website not found.

Can anyone tell me how can I achieve this task?

Thanks in Advance.
Comment
Watch Question

On you router you have to forward port 80 to your web server on your lan.

Since ever router is different this is a good website to help you forward the port.

http://portforward.com/

Please keep in mind, that many consumer internet providers block port 80. You might have to use another port from the wan side like 8080 or 8000.

as an FYI http runs over port 80 and https runs over port 443.
Do you have a public IP address or is it dynamic? You can find yours by clicking here http://www.myipaddress.com

Then do as stephen_c01 told you and forward the port (80 by default) from you router to the INTERNAL ip address of your iis web server.

If you don't know how check http://portforward.com/, You'll find plenty instructions per brand/model of routers.
Commented:
first of all ,if you want to publish your website on the internet,  then i don't recommend you to do this on a router. you have to install this server on a DMZ (Demilitarized Zone) for security reason,

now if you want to publish your website on "your" WAN , you have to do the following,

if you have a DNS server, you have to configure a new host with the ip of the server pointed to your website.
configure a static route on your router, or if u are using eigrp just put the network you are on.
on the remote router/ site you have to configure a static route, to reach the your webserver, now if you have a DNS on the remote site connected to the main site, than you have to do nothing, if u do not have a DNS server then you have to configure the host file in each computer pointing the site address to its ip.

 
The DMZ zone pballan mentions is trully sound advise. Once you grasp whats needed to publish your website directly, you should setup up your network with a Demilitarized Zone.

Here's more info on DMZs

http://en.wikipedia.org/wiki/DMZ_(computing)

Check the arquitecture section for network physical layout graphs.
First of all, understand that all accesses to a web page server will come directed to Port 80 - which is nothing more than an address extension.

Presumably all of your internal LAN accesses to web pages do this - but are outgoing.
And, presumably, any incoming accesses to Port 80 are trying to access your web page.  So, there's no conflict there.

So, you can do what you want using two routers:

The first router WAN/internet port is connected to your internet source - DLS modem, cable modem, etc.

The LAN side of the first router either has multiple ports or you can plug its single port into a switch to get multiple ports.  I will assume that the LAN address of the first router is 192.168.1.1 / 255.255.255.0.

You plug the web server into the first router LAN or switch as above.  It needs to have a static IP address manually entered.  I will assume that you assign:
1902.168.2.1 / 255.255.255.0  Gateway 192.168.1.1.

The second router WAN/internet port is connected to the first router LAN or switch as above .. as well.  I will assume that you have DHCP turned on on the first router and the addresses start at 192.168.1.100.  Set the second router to get its IP address via DHCP.  So, now we'll assume that the second router WAN/internet IP address is 192.168.1.10x and it will also receive all DNS information from the first router via DHCP.

Your private network is connected to the LAN side of the second router.

Now, in the first router, forward Port 80 to 192.168.1.2 (which is your web server).  This may be found in "Port Forwarding" / "Applications" / or "Gaming" ..... etc.

If you're going to support https, then perhaps also Port 443.

The better the routers are as firewalls the better of course.

Your internal computers should be able to "see" the web server.
The web server should not be able to "see" the internal computers at all.

Check this out:
http://www.boutell.com/newfaq/creating/hostmyown.html

Author

Commented:
Hi fmarshall:,
Thanks for the reply.  Most of your assumptions are right with the IP addresses but I'm having only small LAN with only one router. I wanna show the applications to my client . Thats why I wanna publish my application on WAN. However I don't have any static IP address.  so How the setup would be if i have only one router?.
You will have to forward your port 80 and setup an dynamic ip address service like DNS2GO o Dyndns.org.

The dynamic ip service will allow people to locate your web server independently of your ip addresss.

If you dont want to go through the trouble you should use a hosting service for your web application.
OK.  As long as you aren't going to widely publish the web site then you could do this:

1) Set your internet interface to "always on" if you can.  This will rather help keep your IP address for longer periods of time.  

2) Go to www.whatismyip.com to get your public IP if you can't see it in your router interface "status" usually.  Send that IP address to your customer.  Otherwise use a dynamic dns addressing method so they can address your site by a URL.

3) In the router, forward port 80 to the computer that is serving up the web site.  You'll need to have an http server running of course.  For example see Apache at:
http://httpd.apache.org/docs/2.2/platform/windows.html

Presumably you have all the necessary internet security software running on the server.

This approach isn't as robust from a security point of view but it meets your stated criterion of "one router".

If this is for a limited time, you might  consider showing your client the application through a web presentation solution like gotomypc or webex.  By doing this, you're sharing  your desktop for a short period of time through a connection the provider asserts is secure.