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 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:

IP Block Subnet

IP Block Subnet

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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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: OR in case it is a wildcard mask, but that is very unlikely so first option is the correct way.

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 or as above 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
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, B is and C is
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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

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

Though - the use of the word "matching" is quite incorrect when speaking of subnets.
Grover McBroomAuthor Commented:
So, MarcusSjogren, you were first. Or anyone, is this screen shot correct so that it will deny access to the class a blocks shown?
That should indeed deny access
Grover McBroomAuthor Commented:
Thanks for the help, really appreciate it. Just had to be sure.
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.