Discussion:
How to block range of IP addresses?
(too old to reply)
Fred
2005-12-06 23:11:31 UTC
Permalink
I received spam from this IP address: 84.189.83.254
Doing a whois 84.189.83.254 revealed that the message
came from Deutsche Telekom AG in Germany, with this
IP range:

inetnum: 84.136.0.0 - 84.191.255.255


How can I block all of the IP addresses in the above
range?


-Thanks
Greg Hackney
2005-12-07 04:54:50 UTC
Permalink
In the main.cf file, under "smtpd_client_restrictions" add a line:

check_client_access cidr:/etc/postfix/cidr

In the file /etc/postfix/cidr, add a line:

84.136.0.0/10 REJECT

--
Greg
Post by Fred
I received spam from this IP address: 84.189.83.254
Doing a whois 84.189.83.254 revealed that the message
came from Deutsche Telekom AG in Germany, with this
inetnum: 84.136.0.0 - 84.191.255.255
How can I block all of the IP addresses in the above
range?
-Thanks
Ron Springer
2005-12-08 03:42:32 UTC
Permalink
Post by Greg Hackney
check_client_access cidr:/etc/postfix/cidr
84.136.0.0/10 REJECT
--
Greg
What if he really wants to keep 84.128.0.0 - 84.135.255.255 ???
RonS
Post by Greg Hackney
Post by Fred
I received spam from this IP address: 84.189.83.254
Doing a whois 84.189.83.254 revealed that the message
came from Deutsche Telekom AG in Germany, with this
inetnum: 84.136.0.0 - 84.191.255.255
How can I block all of the IP addresses in the above
range?
-Thanks
Birre
2005-12-09 15:04:08 UTC
Permalink
Post by Ron Springer
Post by Greg Hackney
check_client_access cidr:/etc/postfix/cidr
84.136.0.0/10 REJECT
--
Greg
What if he really wants to keep 84.128.0.0 - 84.135.255.255 ???
RonS
Yeah, the top poster (greg) did some calculation error :-)
Post by Ron Springer
Post by Greg Hackney
Post by Fred
I received spam from this IP address: 84.189.83.254
Doing a whois 84.189.83.254 revealed that the message
came from Deutsche Telekom AG in Germany, with this
inetnum: 84.136.0.0 - 84.191.255.255
How can I block all of the IP addresses in the above
range?
-Thanks
My guess will be:

84.136.0.0/13
84.144.0.0/13
84.152.0.0/13
84.160.0.0/13
84.168.0.0/13
84.176.0.0/13
84.184.0.0/13

unless you can say:
84.128.0.0/13 OK
84.128.0.0/10 REJECT

But I have no idea if that will work, or even if OK is ok here.

/birre
Greg Hackney
2005-12-11 21:09:15 UTC
Permalink
Post by Birre
Yeah, the top poster (greg) did some calculation error :-)
Their entire dial-up group is indeed 84.136.0.0/10


$ whois -h whois.ripe.net 84.189.83.254
inetnum: 84.136.0.0 - 84.191.255.255
netname: DTAG-DIAL20
route: 84.128.0.0/10
descr: Deutsche Telekom AG, Internet service provider
origin: AS3320
member-of: AS3320:RS-PA-TELEKOM


I assumed the orignal poster had just mis-stated the range.
--
Greg
Ron Springer
2005-12-12 04:14:02 UTC
Permalink
Post by Greg Hackney
Post by Birre
Yeah, the top poster (greg) did some calculation error :-)
Their entire dial-up group is indeed 84.136.0.0/10
$ whois -h whois.ripe.net 84.189.83.254
inetnum: 84.136.0.0 - 84.191.255.255
netname: DTAG-DIAL20
route: 84.128.0.0/10
descr: Deutsche Telekom AG, Internet service provider
origin: AS3320
member-of: AS3320:RS-PA-TELEKOM
I assumed the orignal poster had just mis-stated the range.
--
Greg
excuse me but:
84.136.0.0/10 -> 84.128.0.0 - 84.191.0.0
it take 3 range definitions to isolate 84.128.0.0 - 84.136.0.0
RonS
Greg Hackney
2005-12-12 04:26:11 UTC
Permalink
Hi Ron,

Please go back and read the original posting by "Fred" and
you'll see exactly what he asked help in doing.

Regards,
--
Greg
Post by Ron Springer
84.136.0.0/10 -> 84.128.0.0 - 84.191.0.0
it take 3 range definitions to isolate 84.128.0.0 - 84.136.0.0
RonS
Birre
2005-12-30 14:50:35 UTC
Permalink
Post by Greg Hackney
Hi Ron,
Please go back and read the original posting by "Fred" and
you'll see exactly what he asked help in doing.
Regards,
--
Greg
Post by Ron Springer
84.136.0.0/10 -> 84.128.0.0 - 84.191.0.0
it take 3 range definitions to isolate 84.128.0.0 - 84.136.0.0
RonS
I think Ron understand what Fred wanted.

The net 84.136.0.0/10 is a part of 84.128.0.0/10 , so
your answer 84.136.0.0/10 will block 84.128.0.0 - 84.191.0.0 ,
not 84.136.0.0 - 84.191.0.0

That is what Ron wrote.

/birre
Greg Hackney
2005-12-30 17:00:05 UTC
Permalink
You are correct Birre. Sorry Ron, I don't know what I was thinking back then, but it
seemed to make perfect sense at the time...
--
Greg
Post by Birre
I think Ron understand what Fred wanted.
The net 84.136.0.0/10 is a part of 84.128.0.0/10 , so
your answer 84.136.0.0/10 will block 84.128.0.0 - 84.191.0.0 ,
not 84.136.0.0 - 84.191.0.0
That is what Ron wrote.
/birre
Loading...