Login

Tag "subnet"

Snippet List

Test IP against IP address+Subnet whitelist

Simple function that tests whether a given IP address is in a list of IP addresses or subnets. Requires `ipaddr`. Comes with Python 2.7 or 3.1, [downloadable here](http://code.google.com/p/ipaddr-py/) for earlier versions. More info on `ipaddr` [in Python 3.1 docs](http://docs.python.org/dev/py3k/library/ipaddr.html).

  • ip-address
  • whitelist
  • ipaddr
  • subnet
Read More

1 snippet posted so far.