Let’s say you want to block access to your website from the IP address 1.2.3.4. The following lines allow access to your site for all users, except for the one with the IP address 1.2.3.4.
# Order Allow, Deny Deny from 1.2.3.4 Deny from 1.2.3.5
Allow from All # Order Deny, Allow Deny from 1.2.3.4 Deny from 1.2.3.5
To block access from multiple IP addresses, just include as many ‘Deny from’ directives as necessary.