Can you block web traffic from Luxembourg?

Category: Blacklist Check

marcstrong
Asked:
2013-06-05 6:10 pm EST

Hits: 656
Can't you just block any pings from Luxemburg?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

I've had dozens of login lockouts because of attempted hacks from Luxemburg
marcstrong
5 Points
2013-06-05 06:11 pm EST

OTHER ANSWERS

0

Arn
Staff
15,973 Points
2013-06-05 7:38 pm EST
Hello Marcstrong,

You can block IP ranges by country. In fact, we have an article on it called How to Block Country IPs in .htaccess. Please follow the directions in this article for the modifications to your website.

However, you may also want to block referrers, because a Luxembourg website address isn't necessarily only in Luxembourg. It can be hosted elsewhere. So you should also add the following code at the TOP of your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.*(\.lu).*$ [NC]
RewriteRule .* - [R=403,L]

The .LU portion of the code blocks any website that ends with ".lu". If you want add multiple countries, then the format will look like this:

RewriteCond %{HTTP_REFERER} ^.*(\.ru|\.su|\.cn|\.ca|\.in|\.eu|\.mx|\.fr|\.ua|\.pt|\.il|\.de|\.uk).*$ [NC]

That's an example of blocking multiple referrers in case you need it. Remember that this code should be at the top of your .htaccess file.

I hope this helps to provide the information you require. The instructions in the article on blocking IP takes you through the steps to modify your .htaccess file using the cPanel File manager's editors.

Please let us know if you require any further assistance.

Regards,

Arnel C.

You must login before you can post a comment about this answer.

Hi Marcstrong,

I meant to also mention that you spelled "Luxemburg" instead of "Luxembourg" - so I'm assuming that you actually meant the country (spelled with the 'o'). There is a Luxemburg, Iowa and a Luxemburg, Wisconsin in the United States. If you were trying to block traffic from there, you'd need the IP addresses. If you ever need to determine an IP address that is hitting your site, you can use the raw access logs. Click on that link and it will show you how to access them through the cPanel. One last thing, since these are public posts, we try to make it easier to find with a search. With this in mind, we will often correct spelling and re-title a question to make it more understandable.

I hope things are okay! Please let us know if you have any further questions or comments!

Regards,

Arnel C.
Arn
15,973 Points
Staff
2013-06-05 7:53 pm EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!