NetworkManager VPN Exclude Local Hosts

For network manager to exclude specific hosts from routing through all VPN connections, create file /etc/NetworkManager/dispatcher.d/99-exclude with contents:

#!/bin/bashINTERFACE=$1ACTION=$2case "$ACTION" in    vpn-up)        route add -host example.org gw 192.168.1.1        ;;    vpn-down)        route del -host example.org gw 192.168.1.1        ;;esac