Start & Stop internet connexion without broking Network Manager
- by user3634569
I am on Precise.
I used this command (with an alias), to close the network,
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager stop
it worked, now I have to use
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.Sleep boolean:true
it work but not so well, sometimes I can't restart the network and NetworkManager is blocked too and strange errors even GUI freeze .
What I need is a command line which close the network and don't mess with Network Manager, maybe with the routing table or what else.