Wednesday, March 5, 2008

Blocking IP addresses from accessing your websites in IIS

To block IP addresses from accessing your website you need to block them in IIS's "Directory Security" block lists. You have two options when applying these IP blocks, you can either apply them so that the IPs can not access any of the websites on your server or only specific sites.

Step 1) Remote Desktop into your server using and account with administrator privileges
Step 2) Click Start>Control Panel>Administrative Tools
Step 3) Open Computer Management
Step 4) Scroll Down to and Select Internet Information Services (IIS) Manager
Step 5a) To block an IP from accessing all websites on your server right click on the "Web Sites" entry on the right side of the window.
Step 5b) To block an IP from accessing only a particular website double click on the "Web Sites" entry on the right side of the window. It should now display a list of websites hosted on your server. Right click on the necessary website.
Step 6) After right clicking a popup menu should be displayed, select properties
Step 7) Select the "Directory Security" tab and click edit in the IP address and domain name restrictions section ( It will be the middle section, second button from the top)
Step 8) A new window should open. There should be a black dot next to the "Granted Access" radio which means that all IPs can access your web server. Click the add button which will open a new window that lets you block specific IP addresses.
Step 9a) To block a single IP select the "Single Computer" radio button and type in the IP address in the white box towards the bottom.
Step 9b) To block a group of computers based off their netblock select the "group of computers" radio button and type in the IP address and Subnet mask into their appropriate boxes.
Step 10) Click the "OK" button
Step 11) Repeat steps 8-10 until all IPs are blocked.
Step 12) On the left hand tree, right click on the "Internet Information Services (IIS) Manager" entry and select All Tasks > Restart IIS. Your server should now block access from those IP to your websites.

To removing IP from the block list repeat steps 1-7 from above to get back to the "IP Address and Domain Name Restrictions" window. Once there select the IP rule from the "Except the following:" list and click the remove button. Once all IPs have been removed restart IIS as described in step 12. It should be stated that if you find yourself applying large amounts of rules you might want to consider the purchasing of a firewall solution as your server's performance would suffer less by blocking offending traffic from ever reaching the server in the first place.

Blocking IP addresses from accessing your ftp accounts in IIS

To block IP addresses from accessing your ftp accounts you need to block them in IIS's "Directory Security" block lists. You have two options when applying these IP blocks, you can either apply them so that the IPs can not access any ftp account on your server or only specific ones.

Step 1) Remote Desktop into your server using and account with administrator privileges
Step 2) Click Start>Control Panel>Administrative Tools
Step 3) Open Computer Management
Step 4) Scroll Down to and select Internet Information Services (IIS) Manager
Step 5a) To block an IP from accessing all ftp sites on your server right click on the "FTP Sites" entry on the right side of the window.
Step 5b) To block an IP from accessing only a particular ftp site double click on the "FTP Sites" entry on the right side of the window. It should now display a list of websites hosted on your server. Right click on the necessary ftp account.
Step 6) After right clicking a popup menu should be displayed, select properties
Step 7) Select the "Directory Security" tab. There should be a black dot next to the "Granted Access" radio which means that all IPs can access your ftp accounts. Click the add button which will open a new window that lets you block specific IP addresses.
Step 9a) To block a single IP select the "Single Computer" radio button and type in the IP address in the white box towards the bottom.
Step 9b) To block a group of computers based on their netblock, select the "group of computers" radio button and type in the IP address and Subnet mask.
Step 10) Click the "OK" button
Step 11) Repeat steps 8-10 until all IPs are blocked.
Step 12) On the left hand tree, right click on the "Internet Information Services (IIS) Manager" entry and select All Tasks > Restart IIS. Your server should now block access from those IP to your ftp accounts

To removing IPs from the block list
Step 1) Repeat steps 1-7 from above to get back to the "IP Address and Domain Name Restrictions" window.
Step 2) Select the IP rule from the "Except the following:" list and click the remove button.
Step 3) On the left hand tree, right click on the "Internet Information Services (IIS) Manager" entry and select All Tasks > Restart IIS.

If you find yourself applying large amounts of rules to your server it might be time to consider a true firewall based solution as your server's performance would suffer less by blocking offending traffic from ever reaching the server in the first place.

How to perform a traceroute using Windows

If you are unable to connect to your server, we may ask you to submit the results of a traceroute from your location to your server.

To perform a traceroute in Windows you need start a command prompt, goto start then run and enter "cmd" as the command. Once you have the command prompt enter "tracert (the ip address or hostname of your server) > C:\tracert.txt" and press enter. Wait for the command prompt to return to signify that the trace has completed. You can open up the file named tracert.txt on the C drive with a text editor to copy and paste the contents as needed.

Binding an IP Address to a Windows Server

Binding an IP Address to a Windows Server

This is the procedure for binding additional IP addresses to a Windows server without a control panel. If you are using the Plesk control panel environment, you should bind the IP address using the panel.

Log into your server using Remote Desktop.

Go to Start->Settings->Control Panel -> Network Connections

Right click on the server’s public interface and go to Properies.

Select TCP/IP and click Properies and to go Advanced. Click the Add button and enter the new IP address and subnet mask. These will be listed in your IP request ticket. Repeat if you are binding multiple addresses.

Once done exit from the Network Properties dialog. The new IP addresses are now ready to use.

How to find the uptime of your Windows server ?

How to find the uptime of your Windows server

From the command line (Start -> Run... -> cmd) enter:

systeminfo | find "System Up Time"

How to block an IP using IIS

To block an IP completely from all websites:

* Right click on Web Sites, select Properties
- In the "Directory Security" tab, click the "Edit" button in the "IP addresses and domain name restrictions" section
- Click on the "Add" button and enter the IP you want to block, then click "OK"
- Click "OK" to exit "IP addresses and domain name restrictions"
- Click "OK" to exit "Web Sites Properties"
- Right click "Internet Information Services", hover over "All Tasks", then select "Restart IIS"
- The offending IP is now completely blocked from accessing any of your websites

To block an IP from just 1 site:

* Right click on Web Sites, select Properties
- In the "Directory Security" tab, click the "Edit" button in the "IP addresses and domain name restrictions" section
- Click the "Add" button and enter the IP you want to block, then click "OK"
- Click "OK" to exit "IP addresses and domain name restrictions"
- Click "OK" to exit "Web Sites Properties"
- Right click on "Internet Information Services", hover over "All Tasks", then click "Restart IIS"
- The offending IP is now completely blocked from accessing this particular site.

Is it possible to setup a scheduled task that will run a web page rather having to log into the server each time and run it manually?

Is it possible to setup a scheduled task that will run a web page rather having to log into the server each time and run it manually?

Yes this is possible within Windows scheduled tasks. Follow these instructions for setting this feature up:

1. Log into your server, open Control Panel, and open Scheduled Tasks.
2. Double click on Add Scheduled Task.
3. Click next on the opening screen.
4. The next screen will give you the ability to select an existing registered application. Scroll down and find Internet Explorer, select this and click Next *
5. On the next screen, select how often you wish to have the task run and provide a unique name for the task.
6. After you click next, select the time you want to have your task run each interval that you selected.
7. Click next again and you will have to provide credentials of an account that has the ability to run scheduled tasks (by default this is normally the Administrator account).
8. Click next again, select Advanced Properties and hit Finish. Within Advanced Properties (on the Task tab) the Run line will have the path to Internet Explorer
9. Go to the end of the path and enter in the web page you wish to run with this particular task (http://www.yourdomain.com/pagetorun.asp)
10. Click on the Schedule tab to verify your task interval settings.
11. Click on the Settings tab and you will want to select the check box (Stop the task if it runs for).
12. Enter in 1 hour for a default value – if your task runs every 30 minutes, then in the minutes option, enter 15 minutes.
13. Click OK and supply your security credentials to verify the changes you have made to the scheduled task.

Your scheduled task is now setup and ready to run. Verify that the task if executing properly by reviewing the Scheduled Task manager. If you see a Last Result value of 0x0, your task is running without any issues. Secondly, verify that the task is processing the updates as you want within your application.

*NOTE: for those who setup the scheduled task, if you do not see Internet Explorer in your list of applications, you can enter the path manually with the following: C:\PROGRA~1\INTERN~1\iexplore.exe.