How Block IPs Using Windows IPSec

Here is something that I would like to share with every one and quite rare to find out. This tutorial will show how to block IPs on Windows server without firewall using IPSec:

Click 'Start' > 'Run' >type 'MMC' press ok.

In the console click > 'File' > 'Add/Remove Snap in'

In the 'Standalone Tab' click The 'add' button

Seclect 'IP Security Policy Managment' > 'ADD' > 'Local Computer' > 'finish' > 'close' > 'ok'

You should now be back to the console.

In the left frame right click 'IP security policies on local computer' > 'Create IP security policy'

Click Next and then name your policy 'Block IP' and type a description.

Click 'Next' then leave 'activate' ticked then click 'Next'

leave the 'edit properties ticked and click 'Finish'

You should now have the properties window open.

Click 'ADD' then click 'Next' to continue.

Leave 'This rule does not specify a tunnel' selected and click 'next'

Leave 'all network connections' selected and click 'next'

You should now be on the IP filter list. You need to create a new filter, so dont select any of the default ones. Click 'ADD'

Type a Name for your list, call it 'IP block list'
Type a description in, can be same as name.
Click 'ADD' then click 'Next' to continue.

In the description box type a description. As its the first IP you are blocking call it 'IP1' or 'IP Range 1'
Leave ticked the 'Mirrored. Match packets with the exact opposite source and destination addresses'
Click 'Next'

The 'Source address' should be left as 'My IP address' click 'Next'

You can now select 'A Specific IP address' or 'A Specific Subnet' for the Destination address.
Type in the IP address you want to block and if blocking a subnet type in the subnet block. Click 'next'

Leave the protocol type as 'Any' and click 'Next' and then 'Finish'

You have now blocked your first IP or IP range.
Continue reading How Block IPs Using Windows IPSec

How to Set Up Virtual Hosting on Apache

If you are running an Apache Web server on a DSL or faster link, you can become a hosting provider for other people. You can even host their domains, without needing an IP for each domain. This is called virtual hosting, and you'd be surprised at how easy it is. Remember, some access providers have rules against running hosting services, check your hosting agreement for more information.

Register a Domain

The first thing that needs to happen is you need to register a domain at Internic or Register.com. Follow the instructions at these sites (links on the right), to register your new domain. If you're creating this for a customer, you can have them register the domain or you can do it yourself.

Domain Name Service

This is the hardest part. If you don't host your own DNS, you'll need to contact your hosting provider to have the new domain added to the DNS server. If you're hosting your own DNS this consists of:

  1. edit Bind or NameD or DNS to add the new domain name
  2. point it to the IP of your virtual hosting server
  3. restart your DNS service

Apache Configuration

Once you have the DNS pointing to your virtual domain server, you need to tell your Web server where to find the Web files for the domain. The way Apache works, if you have set up virtual domains, the first domain entered is the default. This is the directory that will be displayed when a virtual domain is not listed in the configuration. (In other words, if the DNS entry made above sends the URL to your IP, but you don't have the virtual host in your httpd.conf file.)

An Example

You have bought the domain www.adogslife.com and you want to host it at the hosting service with the IP 10.1.1.1 (which you also own).

DNS is set up to point to that IP.

Now you must edit your Apache httpd.conf file:

  1. Go to the section of the httpd.conf file on Virtual hosting (sometimes it's in srm.conf)
  2. Make sure that the NameVirtualHost points to your IP:NameVirtualHost 10.1.1.1
  3. The first virtual host entry should be your default domain:
     
    ServerName www.defaultdomain.com
    DocumentRoot /www/domain
  4. Then list the new domain, with any options you'd like to add:
     
    ServerName www.adogslife.com
    DocumentRoot /www/dogslife
    ErrorLog logs/adogslife.com-error_log
    TransferLog logs/adogslife.com-access_log

Note, I added two lines to the second virtual host. These allow you to separate out the Error and Transfer logs for the new domain from your default domain. If you are going to host virtual domains for other people, they will almost certainly want their server logs, and this makes it easy to provide that to them as well.

Continue reading How to Set Up Virtual Hosting on Apache

How can I install PHP5 under IIS 6.0?



Download the latest PHP version for Windows from http://www.php.net/downloads.php, right-click on the PHP folder, and select "Extract All..."



Select "Next"



Choose C:\Program Files\PHP5 as extract directory and click on "Next"



Uncheck "Show extracted files" and click on "Finish"



Launch the "Internet Information Services (IIS) Manager" from the start menu. You need to install IIS in case this option is not available.



Right-click on "Website" and select "Properties"



Select the "Home Directory" tab and choose "Configuration"



Choose "Add"



Add "C:\Program Files\PHP5\php5isapi.dll" (including quotes) to "Executable" and add .php as extension. Then limit the verbs to GET,HEAD,POST,TRACE and click on OK



Now choose the "Documents" tab and select "Add"



Enter index.php and click on OK



Now, you can change the priority of your index.php with the "Move Up" button. This is only necessary if you run primary a PHP based website



Finally, select Web Service Extensions on the left side and choose "Add a new Web service extension"



Select "Add" and enter as path C:\Program Files\PHP5\php5isapi.dll and click on OK



Then enter php5 as extension name and check "Set extension status to Allowed". Then click on OK to enable this extension



Copy C:\Program Files\PHP5\php.ini-dist to C:\WINDOWS\php.ini and restart IIS

Then create the following php file with Notepad:


Save this file under C:\Inetpub\wwwroot\test.php

Now launch Internet Explorer and go to http://localhost/test.php . You should see the PHP info page if your PHP5 installation was successfully.







Continue reading How can I install PHP5 under IIS 6.0?