Link to home
Start Free TrialLog in
Avatar of Grover McBroom
Grover McBroom

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of MarcusSjogren
MarcusSjogren

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of MarcusSjogren
MarcusSjogren

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.
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
Avatar of Grover McBroom

ASKER

User generated image
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
Thanks for the help, really appreciate it. Just had to be sure.