Python Forum
Is it possible to trun local internet access off programmatically? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Is it possible to trun local internet access off programmatically? (/thread-13026.html)



Is it possible to trun local internet access off programmatically? - Larz60+ - Sep-24-2018

Is there a way to enable or disable local internet access programmatically ?


RE: Is it possible to trun local internet access off programmatically? - nilamo - Sep-24-2018

ifconfig eth0 down?

On Windows, there's netsh: https://stackoverflow.com/a/86611


RE: Is it possible to trun local internet access off programmatically? - Larz60+ - Sep-24-2018

Quote:ifconfig eth0 down?
gives me something to investigate, thanks


RE: Is it possible to trun local internet access off programmatically? - wavic - Sep-25-2018

systemctl stop NetworkManager.service 
?


RE: Is it possible to trun local internet access off programmatically? - DeaD_EyE - Sep-25-2018

On modern Linux system we should all use systemd :-)
You'll find also packages on Pypi to control systemd.