WSL avec VPN
Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object -ExpandProperty ServerAddresses
Better Baboon
Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object -ExpandProperty ServerAddresses
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
Get-DnsClientGlobalSetting | Select-Object -ExpandProperty SuffixSearchList
Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000