Solved

Blocking, only allowing South African IP address blocks

Posted on 2014-10-30
6
360 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 
LVL 23

Expert Comment

by:Dr. Klahn
Comment Utility
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
Comment Utility
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 23

Expert Comment

by:Dr. Klahn
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

762 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

10 Experts available now in Live!

Get 1:1 Help Now