LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-18-2022, 04:03 PM   #1
Jason_25
Member
 
Registered: Nov 2001
Posts: 180

Rep: Reputation: 23
Determine the subnet mask of a remote network?


I have a whole network range I would like to block which is 192.241.0.0. In order to block everything in this range I need to know the subnet mask/CIDR.

Until now I have been blocking with a large list of addresses and blocking with my own list of individual addresses.

I don't really need a tutorial on subnet masks because like anything math related I have learned about it and forgotten it many times.

I don't really feel like choosing every CIDR from 1 to 32 and waiting to see if works or not.

I think I must be missing something very basic here. I figured it would be easy to block an address range but I must know the subnet mask first.
 
Old 12-18-2022, 05:01 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,347

Rep: Reputation: Disabled
whois will tell you the size of the allocation, which is probably what you want.

There is also an ICMP message type called "Address Mask Request", but a) it's not mandatory for hosts to respond to these requests, and b) the network is probably subnetted anyway, so knowing the mask of any individual host is of no value.
 
Old 12-18-2022, 05:51 PM   #3
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
https://www.whois.com/whois/192.241.0.0

/21

Doesn't mean it is CIDRed smaller, however.

Last edited by elgrandeperro; 12-18-2022 at 06:01 PM.
 
Old 12-19-2022, 12:24 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,750

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
You have the answer, but I’m curious (read nosy) about why want to block that netblock and what you’re blocking it from.
None of my business, of course…
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change loopback network mask or redirect subnet to another interface Nitup Linux - Networking 2 05-05-2017 03:05 PM
ip , network address , subnet mask basics sumeet inani Linux - Newbie 3 05-11-2014 11:33 PM
network Address subnet mask kapilbajpai88 Linux - Newbie 4 04-28-2009 04:27 PM
All network/broadcast pairs for subnet mask? debbo Linux - Networking 1 06-14-2004 04:27 PM
Remote Subnet Mask? - help! MikHud Linux - Networking 2 01-14-2003 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration