pedropt
2015-11-21, 13:34
I have upgraded my kali 1.1.0 to 2.0 , and one thing that i had in debian 7 that i didnt found in debian 8 was how easy was to restart networkmanager and configure eth0 connections .
So i will show you how it was before , and how it is now :
Kali 1.1.0a = Debian 7
Kali 2.0 = Debian 8
Restarting networkmanager :
Debian 7
service networkmanager restart
Debian 8
/etc/init.d/network-manager restart
Restarting network
Debian 7
service networking restart
Debian 8
/etc/init.d/networking restart
Open network icon on your tab (in case it disappeared)
Debian 7
open nmapplet
Debian 8
open nm-applet
Setup default network as managed =true
Debian 8
nano /etc/NetworkManager/NetworkManager.conf
change : managed=false to managed=true
in nano editor press both keys "ctrl+o" o from oblivious and not zero , to save
and "ctrl+x" to exit
simplifying
If you think you may not remember sometimes the init.d path to start restart network or other system tools , then you can add /etc/init.d/ path directory variable to your system path variable , and instead writing :
/etc/init.d/network-manager restart
you will start using only :
network-manager start
but for that to work you must add /etc/init.d path to your system variables
to do that open you terminal and write :
PATH=$PATH:/etc/init.d
after this command you can forget the init.d path to start any command under that directory and call the programs directly , like :
networking restart
network-manager restart
ssh start
metasploit start
postgresql start
and any other system utils you may have inside init.d directory
simplifying more - Look the update and ignore this part
if instead using "network-manager" to restart or start or even stop the service , or even opening the applet in control bar as "nm-applet" , you can simplify these services to their original name that was in debian7 , for that all you need to do is to copy them with their old name .
Like :
cp /usr/bin/nm-applet /usr/bin/nmapplet
cp /etc/init.d/network-manager /etc/init.d/networkmanager
chmod +x /usr/bin/nmapplet
chmod +x /etc/init.d/networkmanager
After this point you can restart network manager with this command on terminal "networkmanager restart/start/stop"
in case network-manager get updated , then you must remove those shortcuts from old versions and start the copy process again .
to remove the "shortcuts" created , you just need to write :
rm /usr/bin/nmapplet
rm /etc/init.d/networkmanager
Update - simplifying more
mmusket33 in post bellow brought a good question that i was missing .
I was thinking that "airmon-ng check" would detect these new shortcut i mention before , but it don't detect , and what will happen is that airmon-ng will not show any conflicting processes , but in reality there is the shortcut "networkmanager" that will enter in conflict with the monitor mode .
So , i was here trying to write a bash script to put in /usr/bin with options start/stop/restart , but it wont work with other name .
The solution in this case was to write 2 bash scripts for networkmanager in /usr/bin , to start it would use "nmstart" and to stop is another script called "nmstop"
If you still want to go ahead then all you have to do is :
- open your terminal
- Write : "nano /usr/bin/nmstart"
and place this code :
#!/bin/bash
network-manager start
and then save the file and exit .
Then apply executing permissions to that new shortcut :
chmod +x /usr/bin/nmstart
then do the same thing to stop network-manager :
- Write : "nano /usr/bin/nmstop"
and place this code :
#!/bin/bash
network-manager stop
and then save the file and exit .
Then apply executing permissions to that new shortcut :
chmod +x /usr/bin/nmstop
this way , airmon-ng will detect the network-manager service running and it will shut it down when it needs it .
If you already created the shortcuts in "simplifying more" , then all you have to do is to remove only the "networkmanager" shortcut , you may leave "nmapplet" .
to do that write this in terminal :
rm /etc/init.d/networkmanager
So i will show you how it was before , and how it is now :
Kali 1.1.0a = Debian 7
Kali 2.0 = Debian 8
Restarting networkmanager :
Debian 7
service networkmanager restart
Debian 8
/etc/init.d/network-manager restart
Restarting network
Debian 7
service networking restart
Debian 8
/etc/init.d/networking restart
Open network icon on your tab (in case it disappeared)
Debian 7
open nmapplet
Debian 8
open nm-applet
Setup default network as managed =true
Debian 8
nano /etc/NetworkManager/NetworkManager.conf
change : managed=false to managed=true
in nano editor press both keys "ctrl+o" o from oblivious and not zero , to save
and "ctrl+x" to exit
simplifying
If you think you may not remember sometimes the init.d path to start restart network or other system tools , then you can add /etc/init.d/ path directory variable to your system path variable , and instead writing :
/etc/init.d/network-manager restart
you will start using only :
network-manager start
but for that to work you must add /etc/init.d path to your system variables
to do that open you terminal and write :
PATH=$PATH:/etc/init.d
after this command you can forget the init.d path to start any command under that directory and call the programs directly , like :
networking restart
network-manager restart
ssh start
metasploit start
postgresql start
and any other system utils you may have inside init.d directory
simplifying more - Look the update and ignore this part
if instead using "network-manager" to restart or start or even stop the service , or even opening the applet in control bar as "nm-applet" , you can simplify these services to their original name that was in debian7 , for that all you need to do is to copy them with their old name .
Like :
cp /usr/bin/nm-applet /usr/bin/nmapplet
cp /etc/init.d/network-manager /etc/init.d/networkmanager
chmod +x /usr/bin/nmapplet
chmod +x /etc/init.d/networkmanager
After this point you can restart network manager with this command on terminal "networkmanager restart/start/stop"
in case network-manager get updated , then you must remove those shortcuts from old versions and start the copy process again .
to remove the "shortcuts" created , you just need to write :
rm /usr/bin/nmapplet
rm /etc/init.d/networkmanager
Update - simplifying more
mmusket33 in post bellow brought a good question that i was missing .
I was thinking that "airmon-ng check" would detect these new shortcut i mention before , but it don't detect , and what will happen is that airmon-ng will not show any conflicting processes , but in reality there is the shortcut "networkmanager" that will enter in conflict with the monitor mode .
So , i was here trying to write a bash script to put in /usr/bin with options start/stop/restart , but it wont work with other name .
The solution in this case was to write 2 bash scripts for networkmanager in /usr/bin , to start it would use "nmstart" and to stop is another script called "nmstop"
If you still want to go ahead then all you have to do is :
- open your terminal
- Write : "nano /usr/bin/nmstart"
and place this code :
#!/bin/bash
network-manager start
and then save the file and exit .
Then apply executing permissions to that new shortcut :
chmod +x /usr/bin/nmstart
then do the same thing to stop network-manager :
- Write : "nano /usr/bin/nmstop"
and place this code :
#!/bin/bash
network-manager stop
and then save the file and exit .
Then apply executing permissions to that new shortcut :
chmod +x /usr/bin/nmstop
this way , airmon-ng will detect the network-manager service running and it will shut it down when it needs it .
If you already created the shortcuts in "simplifying more" , then all you have to do is to remove only the "networkmanager" shortcut , you may leave "nmapplet" .
to do that write this in terminal :
rm /etc/init.d/networkmanager