sqlite-ip Work-in-progress SQLite extension for working with IP addresses. For now you can probably use sqlean's ipaddr module.