Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

disable public internet access linux

GW="$(sudo /sbin/route -n | awk '$1=="0.0.0.0" {print $2; exit}')"
sudo /sbin/route del default gw "$GW"
echo "$GW" >~/my_tmp_file

The last line saves the value in a file for later use when you want to restart the network:
sudo /sbin/route add default gw "$(cat ~/my_tmp_file)"
Comment

PREVIOUS NEXT
Code Example
Shell :: github popcat click script click on this link 
Shell :: bash awk remove one specific column 
Shell :: tail and watch directory linux 
Shell :: remove history from git branch 
Shell :: Cloning mercurial and setting it up in your machine 
Shell :: extending ubuntu screen to android 
Shell :: Openstack on ubuntu 18.04 
Shell :: screenshot tool with markup in linux manjaro 
Shell :: Hay una opción git-merge seco-run 
Shell :: create repository in github using command line 
Shell :: how to check cpu temperature ubuntu 20.04 
Shell :: The requested URL was not found on this server. Apache/2.4.29 (Ubuntu) Server at 
Shell :: bash set+x hide 
Shell :: To find MTP devices in Power Shell use this command: 
Shell :: linux instal netmanager 
Shell :: imagem para pdf linux 
Shell :: resume screen linux 
Shell :: how to add new path to sudoers 
Shell :: shh key pair for github 
Shell :: git delete branch error not found 
Shell :: obisidian linux 
Shell :: how to connect xserver and uduntu via terminal 
Shell :: linux replace after char 
Shell :: uninstall minikube ubuntu 20.04 
Shell :: push local file to remote forcefully 
Shell :: override dh_dwz 
Shell :: instalar Git en PowerShell 
Shell :: shell script for creating a pod using helm 
Shell :: set dynamic values with kubernetes yaml file 
Shell :: multiple-gits 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =