We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide
Blocking an IP address
Whiteknight
Posts: 483 Forumite
in Techie Stuff
Wonder if anyone could help, I have a website and am trying to block an IP address the only problem being that the visitor is using a static address so I have decided the best way to stop this visitor would be to block all traffic. I have tried tweaking the htaccess file but don't seem to be having much luck.
Any ideas?
This is a the section of the htaccess file -
Any ideas?
This is a the section of the htaccess file -
<Limit GET POST>
order deny,allow
deny from all
deny from client-86-29-
deny from client-86-29-141-193.cdif.adsl.tesco.net
deny from client-86-29-1xx-xxx.cdif.adsl.tesco.net
deny from cdif.adsl.tesco.net
allow from all
</Limit>
0
Comments
-
Whiteknight wrote: »Wonder if anyone could help, I have a website and am trying to block an IP address the only problem being that the visitor is using a static address so I have decided the best way to stop this visitor would be to block all traffic. I have tried tweaking the htaccess file but don't seem to be having much luck.
Any ideas?
I'm not by any means an expert, but isn't the syntax supposed to be:
<Limit GET POST>
order allow,deny
allow from all
deny from xxx.xxx.xxx.xxx
</Limit>
where xxx.xxx.xxx.xxx is obviously their static IP address, which you know from the server logs?0 -
I'm guessing that your website is running Apache. Have you tried blocking the IP address for example 86.29.141.193 and see if that makes any difference? Also, why not edit the httpd.conf file and try the following:
<Directory "/directory_name">
Options FollowSymLinks Includes
AllOverride None
Order allow,deny
Allow from all
Deny from xx.xx.xxx.xxx
Deny from xxx.xxx.xxx.0/8
</Directory>
You could also add the network in the deny field: Deny from xxx.xxx.0.0/16 but you'd need to know the subnet.
You could also block the IP Address completely using firewall rules instead0 -
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 353.5K Banking & Borrowing
- 254.1K Reduce Debt & Boost Income
- 455K Spending & Discounts
- 246.6K Work, Benefits & Business
- 602.9K Mortgages, Homes & Bills
- 178K Life & Family
- 260.5K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards