How to disable interface just for NetworkManager in Kali Linux?

10,746

To disable your interface run the following command:

ip link set wlan0 down

To disable it at boot edit /etc/rc.local add the following line :

ifconfig wlan0 down

before the "exit 0" line .

Share:
10,746

Related videos on Youtube

typos
Author by

typos

Updated on September 18, 2022

Comments

  • typos
    typos over 1 year

    I have two WLAN interfaces, and I want to disable one of them for NetworkManager, so that if I run something like service network-manager stop, all the interfaces should stop except on of the WLAN interfaces.

    I checked only certain things, and I found that I need to specify something like this:

    [main]
    plugins=ifupdown,keyfile
    
    [ifupdown]
    managed=false
    
    [keyfile]
    unmanaged-devices=mac:MAC_OF_MY_WLAN_INTERFACE_I
    

    The point is that, I have specified the MAC of the interface that I want not to be touched, but then again, when I run service network-manager stop, they are both disabled. Please note that the interface that I want to keep active is wlan1. Any ideas, how can I disable an interface for NetworkManager, so it cannot manipulate the interface?

  • typos
    typos almost 8 years
    I just want to disable the interface for NetworkManager, so that, if I have an interface that is connected to the Internet, after running service network-manager stop, I want that interface still to be up and have Internet connection.
  • Shadur
    Shadur over 6 years
    init is already root when it executes rc.local. Don't use sudo where it's not needed.