Correct format of IP Address and Subnet

I'm trying to operate our Microsoft SMTP server and want to deny access to an entire class A block of ip addresses. I know there are probably other ways to do this but I want to use my Windows 2003 R3 default SMTP and POP3 server for mail processing. Getting lots of Russian hits we don't want. I'd prefer to do so this way instead of using Windows Firewall.

This is not a relay question.

But I'm a bit confused as exactly how to format the ip address class A block in the SMTP server I want to deny. I opened the SMTP server properties, ACCESS tab, then connection tab, using "All except the list below" and using Group of computers" to enter my ip and subnet.

Example. I want to deny all incoming ip addresses for the entire class A block beginning with 5. (such as 5.6.17.200) but I want every single IP address blocked in the entire class A. I'm aware of the ramifications and will do this in my SMTP server. How should it be written, including subnet?

Again, I am aware that it will block ALL ip addresses in the class A. I just need to be sure I'm entering the correct ip format.

As an example, if I want to deny smtp access to the entire class A block that begins wth 5:

THIS WAY:
IP Block 5.0.0.0. Subnet 255.255.255.255

OR THIS WAY?
IP Block 5.0.0.0. Subnet 255.0.0.0

Or some other variant? As you can see, I'm not sure if the "0" allows or denies. I'm an obvious beginner.
Grover McBroomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MarcusSjogrenCommented:
5.0.0.0 255.0.0.0 OR 5.0.0.0 0.0.0.255 in case it is a wildcard mask, but that is very unlikely so first option is the correct way.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kash2nd Line EngineerCommented:
answering specifically to your question. Class A subnet is 255.0.0.0 or as above 5.0.0.0/8 should work. Not a recommended way.

You are better off using email filtering solution like Maxmail from GFI, pure message by Sophos as an example.

I don't even know how exh 2003 will handle that block you are trying to put in
0
MarcusSjogrenCommented:
Basically - the netmask tells you which part of the IP that belongs to the network address and which is the client address.

Ip addresses consist of four corrects separated by dots, so class A (one octet for network address) is 255.0.0.0, B is 255.255.0.0 and C is 255.255.255.0.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

MarcusSjogrenCommented:
So you could say that the 0's match everything.

Example for IP 5.1.2.0
255.0.0.0 will match everything starting with 5.
255.255 will match everything starting with 5.1
255.255.255.0 will match anything starting with 5.1.2

Though - the use of the word "matching" is quite incorrect when speaking of subnets.

http://en.m.wikipedia.org/wiki/Classless_Inter-Domain_Routing
0
Grover McBroomAuthor Commented:
ipsblocked-screenshot.gif
So, MarcusSjogren, you were first. Or anyone, is this screen shot correct so that it will deny access to the class a blocks shown?
0
MarcusSjogrenCommented:
That should indeed deny access
0
Grover McBroomAuthor Commented:
Thanks for the help, really appreciate it. Just had to be sure.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.