Answer the question
In order to leave comments, you need to log in
How to automatically block the Internet when the VPN connection is broken in Linux?
Usually there are such tips: Connect VPN, then run the command in the console route del default
. If the VPN connection breaks, the entire network will turn off automatically. To turn on the Internet again, you need to execute the command route add default gw 192.168.1.1 eth0
. Except the route command is part of the outdated net-tools network utilities package and in modern distributions it has been replaced by the iproute2 package. What commands should be given in this case?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question