Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

I want to block all visitors from country X

Posted on 2007-10-05
8
Medium Priority
?
261 Views
Last Modified: 2009-07-29
Hello,

I have experianced a number of attacks all from a specific country.

I would like to completely block access to all users from that country.

I realize that this is not fool proof because people from that country could still use a proxy.

I also realize that people in that country that are not hackers would not be able to access my web site but for the time being I still want to put this in place.

I use Linux / Cpanel / Apache.  I have iptables installed.

Is there any way I can block all access to people from the problem country?

Thanks!

0
Comment
Question by:hankknight
8 Comments
 
LVL 3

Expert Comment

by:EntityPacket
ID: 20024955
Why don't you just block the subnets your having attacks from?
0
 
LVL 16

Author Comment

by:hankknight
ID: 20025169
How do I do that?
0
 
LVL 3

Expert Comment

by:mhequipit
ID: 20025234
What kind of a firewall do you have?  This is important.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 3

Accepted Solution

by:
EntityPacket earned 1000 total points
ID: 20025404
0
 
LVL 3

Assisted Solution

by:mhequipit
mhequipit earned 400 total points
ID: 20026155
Is your firewall and webserver 1 box?  I wouldn't do it on the webserver if you have a firewall in front, and if you have a linux box on the net with no protection I hope you are checking for rootkits.
0
 
LVL 19

Assisted Solution

by:Gabriel Orozco
Gabriel Orozco earned 400 total points
ID: 20026504
really really really you cannot protect yourself in this way.

any attacker can connect to a different box on other subnet and begin attacking you again.

if your problem is too many connections from one IP, then the best way is to just block it. I agree. just take in mind it would still consume your bandwidth.

but if your problem is security related, then you need to work to protect yourself on your own side instead trying to block progressively all the the Internet.
0
 
LVL 4

Assisted Solution

by:redcelltech
redcelltech earned 200 total points
ID: 20032122
Do not firewall these connections from the host. I have seen instances where iptables will bring the machine to a crawl processing rules against connections. This is a job for a perimeter firewall. Also, if you could describe the attack in more detail that would help.
0
 
LVL 3

Expert Comment

by:mhequipit
ID: 20033400
Right on redcelltech.  That's why I was asking what kind of firewall, the config should be fairly simple once we have that information.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question