Solved

Blocking, only allowing South African IP address blocks

Posted on 2014-10-30
6
365 Views
Last Modified: 2014-11-04
Say, we wish to stop hackers and the suggestion is to only allow through South African IP addresses as we are based in South Africa and the all the connections to the server are coming from South African IPs. Please assist with obtaining the South African IP address ranges as well as instructions on how to configure the Firewall on a Win2008 server. The server is on a Public South African IP and there is no firewall in front of it that we can configure. tx
0
Comment
Question by:shaunwingin
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:David Paris Vicente
ID: 40413887
Hi shaunwingin,

This will require a lot of effort.
Because this will require a lot o writing I'm pointing to some links that can help you.
For the Ip address' assigned to South Africa the most reliable  source will be the Communications regulator in South Africa.

But you can find some address' here and here
.

For configuring the windows 2008 firewall you can find a tutorial here.


Hope it helps.

David
0
 

Author Comment

by:shaunwingin
ID: 40414154
Tx - with this  method: For configuring the windows 2008 firewall you can find a tutorial here.
I would have to block all those outside South Africa.
How would I only allow South Africa IP in?
How can I prevent locking myself out of the server- must I allow the servers ip explicitly - I assume to be safe as applying the allow IP's rule and using South African ranges - will this effectively block all other ips?
0
 
LVL 12

Accepted Solution

by:
David Paris Vicente earned 500 total points
ID: 40416133
Because this can be really tricky, I suggest to do following.

Create a rule - > General Tab  choose Allow connection
Scope -> Select any local IP address then in the Remote IP add all South African subnets including all your private network in the Remote IP Address.

What this will do, will only permit access from the defined subnets.

Example:

I suggest to try first for the ICMP protocol, for that in the inbound rules disable only the File and Printer Sharing (Echo Request - ICMPv4-In) and File and Printer Sharing (Echo Request - ICMPv6-In)
Then try to ping the machine if everything is ok you will not be able to ping that machine, but the RDP session is available.

Then I have the following scenario, but you will have to tweak for your reality.

I have a server in my DMZ this server has the IP 10.0.14.1
I also have a private network with the following subnet 10.0.12.0/23
So in the Scope tab I choose the radio button for Any IP Address in the Local IP Address


And in Remote IP Address choose all the subnets that you want to define, probably all your internal subnets ( in my case I have a Network Class A, so all my internal/Private network is inside of this scope 10.0.0.0/8, so I will define this large subnet) and also the South African subnets. Try it first for the private network.

After this test you will be able to understand the flow, and you will understand what protocols you will want to permit or deny.

Note: Don´t Disable any protocol for RDP, you will loose remote access.


I hope to not confuse you but is tricky that's why this settings are more easily configured in a firewall appliance.


Regards
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 24

Expert Comment

by:Dr. Klahn
ID: 40419503
I would take a different approach ... I think this is a lot simpler to do in linux.

Bring up a basic linux router / firewall from any of the preconfigured kits on the internet.  A very small system will do as long as it has two Ethernet interfaces.  Configure it to pass all traffic between ports A and B.

Install iptables on the system and also add the geoip plugin.

Then add a shell script to run at startup time after networking is up, with the command line

iptables -t filter -A INPUT -i eth0 -m geoip --src-cc ZA -p tcp -j ACCEPT
iptables -t filter -A INPUT -i eth0 -p tcp -j REJECT


Assume that eth0 is the Ethernet port facing the internet and that the system is routing traffic from eth0 to eth1 and vice versa.  This accepts all incoming connections on ethernet interface 0, on every port, coming from South Africa, and rejects all others.

This will be about 99% reliable if the geoip database is updated weekly via cron script.  It won't be perfect because there is always some ISP changing their CIDR blocks and it takes a while for that information to percolate out to the geoip database.

A nice side benefit of this is that you can do other blocking and accepting as well down to very specific levels.  If one particular ISP is a spam problem, it can be locked out with a line similar to:

iptables -t filter -A WebLockouts -s 38.0.0.0/8 -p tcp --dport 25 -j REJECT
0
 
LVL 12

Expert Comment

by:David Paris Vicente
ID: 40419570
DrKlahn
Is correct but I don´t mention this approach because shaunwingin  is asking for help with a windows firewall.

But yes, It will be easier with Linux, at the end you will not mess with windows firewall protocols and some service ports needed for communications.
0
 
LVL 24

Expert Comment

by:Dr. Klahn
ID: 40419616
Ah, my bad.  I forgot to add something very important ...

"Place the linux router/firewall in front of the existing Windows server, facing the internet, so that it can filter the traffic before the Windows system sees it.  Then no changes are needed in the Windows system."
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

To setup a SonicWALL for policy based routing to be used with the Websense Content Gateway there are several steps that need to be completed. Below is a rough guide for accomplishing this. One thing of note is this guide is intended to assist in the…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

864 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now