Debian: Turn of wifi when on a wired connection

Create this file (be sure to set chmod +x on it) /etc/NetworkManager/dispatcher.d/99-wlan-disable Here is what should be in the file: #!/bin/bash wired_interfaces=”en.*|eth.*” if [[ “$1” =~ $wired_interfaces ]]; then case “$2” in up) nmcli radio wifi off ;; down) nmcli radio wifi on ;; esac fi

Published
Categorized as InfoSec