Skip to content

Instantly share code, notes, and snippets.

@luanvuhlu
Last active April 4, 2024 12:23
Show Gist options
  • Save luanvuhlu/a573d1b85b261be72369f6ca453e05b1 to your computer and use it in GitHub Desktop.
Save luanvuhlu/a573d1b85b261be72369f6ca453e05b1 to your computer and use it in GitHub Desktop.
fix network after connect cyberghost
sudo mv mynetwork.sh /usr/local/bin/mynetwork
#!/bin/bash
# Backup the original resolv.conf
sudo cp /etc/resolv.conf /etc/resolv.conf.bak
# Write the new nameservers to resolv.conf
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" | sudo tee /etc/resolv.conf
sudo service NetworkManager restart
sudo cyberghostvpn --traffic --country-code JP --connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment