Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

WSL with VPN

Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object -ExpandProperty ServerAddresses
Comment

WSL with VPN

sudo unlink /etc/resolv.conf # this will unlink the default wsl2 resolv.conf

# This config will prevent wsl2 from overwritting the resolve.conf file everytime
# you start wsl2
cat <<EOF | sudo tee -a /etc/wsl.conf
[network]
generateResolvConf = false
EOF

cat <<EOF | sudo tee -a /etc/resolv.conf
nameserver 10.64.102.100 
nameserver 10.64.102.200 
nameserver 10.27.27.1 
nameserver 8.8.8.8
nameserver 8.8.4.4
search ne.mytravelgroup.net 
EOF

# Make the new /etc/resolve.conf immutable
sudo chattr +i /etc/resolv.conf
Comment

WSL with VPN

Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000
Comment

WSL with VPN

Get-DnsClientGlobalSetting | Select-Object -ExpandProperty SuffixSearchList
Comment

PREVIOUS NEXT
Code Example
Shell :: what is bash 
Shell :: git config global username and email 
Shell :: docker copy folder to container 
Shell :: mkdir create all subdirectories 
Shell :: git rebase branch 
Shell :: how to setup path using git bash in windows 
Shell :: npm supertest 
Shell :: what is uname -r linux 
Shell :: svelte getting started typescript 
Shell :: steps to sync branch to fork master? 
Shell :: sed replace all until match in line 
Shell :: wsl import 
Shell :: Start MySQL FreeBSD 
Shell :: should you use docker on linux 
Shell :: github new repository 
Shell :: docker run 
Shell :: sshfs syntax with ssh key 
Shell :: install wordpress linux 
Shell :: git to png linux 
Shell :: git checkout filename 
Shell :: download and install virtualbox with powershell 
Shell :: debian build with ccache 
Shell :: chocolatey cmd 
Shell :: bash continue on error 
Shell :: find and kill android device offline on Mac 
Shell :: Installing ruby version manager (rvm) 
Shell :: logger command to remote syslog 
Shell :: laravel github clone error 
Shell :: where are php errors logged 
Shell :: ubuntu dock setting 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =