Re: Proposal to apply mask to IP address set on rule
Andy Ruhl <[email protected]> Fri, 23 May 2025 16:18:05 -0700
| Newsgroups | gmane.os.netbsd.devel.network |
|---|---|
| Message-ID | <CAJcb3foAE7o3ct_rTX+K86KA_-MoFrZHUxVWtZcCzcwmCp5KzA@mail.gmail.com> |
On Wed, May 21, 2025 at 9:16 AM Emmanuel Nyarko <[email protected]> wrote: > > Supposed we want to block or pass packets from a subnet > > Say 192.168.64 subnet.(24 bits masking) > > So if We > "pass from 192.168.64.7/24" on a rule. > > Is it ideal to also match all packets from 192.168.64 subnet ? As it would if we passed as > 192.168.64.0/24 on rule. Allegedly I'm a network guy. When you add the subnet mask to a rule, to me that means "use the subnet that the address resides in". For example nmap -sn -n 192.168.64.57/24 means "scan 192.168.64.0/24" If you're applying an IP to an interface with the mask, it's just indicating the mask for the IP. Andy