We've got a webserver running IIS. We'd like to run maybe a shared blog or something to keep track of information. Because of security issues, we'd like for that part to be only viewable from localhost so people have to remote in to use it.
So, to repeat my question, can part of a website be made viewable from localhost only?
To open the local site we have to use https://localhost/ or https://127.0.0.1/ in web browser to open the site. If our file name in the website is mysite. htm and is stored inside wwwroot and the complete path is like this c:\Inetpub\wwwroot\mysite.
In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS). In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services. On the Select Role Services page of the Add Role Services Wizard, select IP and Domain Restrictions, and then click Next.
For some one doing it in IIS 8
/ Windows 2012
1) In Server Manager
, go to Manage, Add Roles and Features
, Next, Next (get to Server Roles
), scroll down to Web Server (IIS)
, expand that row, then expand Web Server
, and finally expand Security
. Make sure that IP and Domain Restrictions are installed.
2) In IIS Manager
, drill down to the folder that you want to protect and left click select it. In the Features View
of that folder select IP and Domain Restrictions In Actions
choose Edit Feature Settings
. Change 'Access for unspecified clients:'
to 'Deny'
then OK.
3) Finally go to 'Add Allow Entry'
In the Action
s menu. Type in the Specific IP address of your server.
Now only requests coming from your server will be allowed access. Or any server that shares that IP address. So in a small network, the office could share the IP address between all of the PCs in that offices, so all of those PCs could access that folder.
Last but not least is to remember that if your network has a dynamic IP address, then if that IP changes, you will expose your blog admin folder to whoever is using that IP now. Also, everyone on that new IP address will lose access to your that folder...
In IIS6 you can bring up the properties for the web and click on the directory security tab. Click the button in the middle of the tab for editing the IP and Domain restrictions. On this tab set all computers as denied, then add an exception for the IPs you want to allow access to this site.
I am not sure how to configure this on IIS7. I looked but couldn't find it, if I find it I will edit this answer.
Edit: Configuring IIS7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With