The predefined filter policies are:
This is a policy where only the MM_FILTER_RULE_EXPLICIT_ALLOWLIST rule is enabled.
# /usr/sbin/ModemManager --filter-policy=ALLOWLIST-ONLY
This is a policy where the following rules are enabled:
This policy is the default one when a different one is not explicitly selected. In this policy, all TTYs are forbidden except for the ones explicitly allowed by one of the TTY-specific rules.
# /usr/sbin/ModemManager --filter-policy=STRICT
Any of the previously defined predefined policies may be modified rule per rule by explicitly enabling or disabling rules via environment variables.
E.g. this would launch ModemManager with the Strict filter policy but with all net and cdc-wdm ports forbidden completely:
# MM_FILTER_RULE_NET=0 \ MM_FILTER_RULE_USBMISC=0 \ /usr/sbin/ModemManager --filter-policy=STRICT
E.g. this would launch ModemManager with the allowlist-only filter policy but also explicitly allowing all net and cdc-wdm ports. Note that in this case, all virtual net ports (e.g. 'lo') are also being allowed.
# MM_FILTER_RULE_NET=1 \ MM_FILTER_RULE_USBMISC=1 \ /usr/sbin/ModemManager --filter-policy=ALLOWLIST-ONLY