Restricting IP Address

W

wrytat

I'd like to restrict access to part of my web application based on IP
addresses so that only my company's computer can access. I understand that
IIS Manager has a security feature to restrict access based on IP addresses.
Does my company have to invest on a STATIC IP address, so that IIS can
identify his IP? Am I right to say that a dynamic IP can't do the job?
How do I know the IP address, so that I can provide to my web host then they
can configure the IIS settings to restrict this IP?
 
J

Joseph MCAD

April 12, 2005

You can do it in code by using the Request.UserHostAddress. You can then
either specify your IP address in code or in a configuration file. If you
are on an intranet, then just ask your Network Administrator for your
internal IP Address. If you are the Network Admin, then try finding your IP
address listed under the IP addresses listed in your router or network
switch that you go through. In my router it says the IP address with the
computer name so that I can identify it. You can also right click on your
intranet connection in the Network Connections section of your control
panel, and then click properties. Then click the Status tab and it should
list it there, but you might have to click Details. I can do this for mine,
and I hope this will help you and have a great day!

Joseph MCAD
 
W

wrytat

Thank you.

Our computers that can access the Internet is connected in a Local Area
Network, and then this network I think is connected to the Internet. So, do I
provide my web hosting company the IP address of the machine on the LAN or
other IP address so that they can help us restrict access to the website by
IP using IIS?

And does my company need to invest on a static IP address? Our company is
currently using a dynamic one. Does that mean it will change all the time and
IIS won't be able to do the task?

Our local telecommuncations company does not sell only 1 static IP. We have
to buy a bundle of 2 or 6 or 14 or 30 and so on. What's the use of getting so
many IP? Isn't 1 enough? And how would I know which is used for the Internet
connection?

I'm sorry~ I'm really ignorant of all these things.
 
J

Joseph MCAD

April 13, 2005

I looked into hosting my own web site on my server that I have, but I too
needed a static IP and haven't bought one yet. The reason that you must buy
them in packs is because you need one for the router, dns, something,
something, maybe another something, and then finally your web server. So out
of the 6, you only get 1 that is "usable" for your server. After you go
above six then you get all of them usable, except the first five or so. I
would give IIS your Lan address and be sure to put "permit only" in IIS.
This is assuming that the web server is on the same LAN. Then just have your
Network Admin set a "static" LAN IP address for your computer that will be
accessing the web site. This will allow your computer's IP address to not
change and therefore can be set in stone in IIS. Just right click on your
Network Connection again (like in the last post) and the click properties.
You should then select TCP/IP in the listbox and the click properties. There
you can set any IP address that you want within the range your router can
handle. Just put the router and DNS as the same IP address unless you have
it otherwise. The subnet mask is generally provided for you. Your web server
doesn't need a static IP address to do what you want. :) Hope this helps!

Joseph MCAD
 
W

wrytat

Actually, our website is hosted with a web hosting company under a hosting
package. So we don't have a web server and our LAN therefore is not connected
to their web server. In that case, how many static IP do I need to invest on,
so that I can tell that web hosting company that I want to permit this IP
address only? And in this case, may I assume that I can't give them my LAN IP
address, but should give them the IP address on the router or what that's
used to connect to the Internet instead? But how to know this IP? Will my ISP
tell me?

I'm really very sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top