Use python3-portend to monitor TCP ports for bound or unbound states.