I'm working on a Rails app that needs to restrict certain privileged
operations/requests to only those requests that originate from within
the local subnet.

How can I find out the machine's netmask programmatically?

Thanks,

Wolf