Python Forum

Full Version: Is it possible to trun local internet access off programmatically?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to enable or disable local internet access programmatically ?
ifconfig eth0 down?

On Windows, there's netsh: https://stackoverflow.com/a/86611
Quote:ifconfig eth0 down?
gives me something to investigate, thanks
systemctl stop NetworkManager.service 
?
On modern Linux system we should all use systemd :-)
You'll find also packages on Pypi to control systemd.