Skip to content

StackStorm-Exchange/stackstorm-networking_utils

Repository files navigation

Networking Utils Pack

This is a pack of useful networking utilities to use in workflows for validation and flow control.

Actions.

  • contains: Check if an address or a network is in another network
  • fping: Runs a fping and return data about packet loss and latency (requires the fping to be available)
  • geoip: Report geoip infomation from MaxMind database(s).
  • hosts: List the hosts inside a network
  • ip_calc: Retrieve netmask, prefix length, broadcast and usable hosts range of a subnet.
  • is_valid_asa_ifname: Check for an valid Cisco ASA interface name.
  • is_valid_ip: Check if an valid IP (IPv4 or IPv6) address (with options to exclude loopback).
  • is_valid_ipv4: Check if an valid IPv4 address (with options to exclude loopback).
  • is_valid_ipv6: Check if an valid IPv6 address (with options to exclude loopback).
  • is_valid_ip_port: Check if an valid IP port (i.e. between 0 and 65535).
  • ping: Pings an IP address / Hostname.
  • resolve: Resolve a DNS or reverse DNS
  • subnets: List the possible subnets of a specific size in a given network
  • traceroute_mtr: Runs a traceroute (requires the mtr command to be available)

GeoIP

To use the geoip action you require at least one of the following MaxMind databases:

It's possible to use either the ISP or ASN databases (if the commerical ISP database is found the ASN is not used), these can be used whether with or without the City database.

Currently only the City, ASN or_ISP_ database types are supported by the action.

Configuration

Configuration is only required is if you want to place the GeoIP2 databases in a different location from the default (/opt/geoip2/) you'll need to create a config file (/opt/stackstorm/config/networking_utils.yaml) as follows (and don't forget to load it) as follows:

---
isp_db: "/path/to/GeoIP2-ISP.mmdb"
city_db: "/path/to/GeoLite2-City.mmdb"
asn_db: "/path/to/GeoLite2-ASN.mmdb"

About

A pack containing useful networking utils for use in workflows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 13

Languages