- 10 Oct 2024
- 1 読む分
- 印刷する
- PDF
Unblock Websites
- 更新日 10 Oct 2024
- 1 読む分
- 印刷する
- PDF
Use this script to unblock the websites defined in the script, that may have been blocked using the block websites script.
Copy and save the contents below to a UTF-8 editor like notepad++ OR Sublime Text in Windows or gedit in Ubuntu.
If you are using notepad++ then use the bottom right panel to change the type to Unix (LF).
Or click here to download the file.
#!/bin/bash # Specify the website to unblock URLS_TO_UNBLOCK= "www.example.com" "www.facebook.com" # Remove the entry for the website from the /etc/hosts file sudo sed -i "/$URLS_TO_UNBLOCK/d" /etc/hosts # Clear the DNS cache sudo systemctl restart NetworkManager echo "Websites unblocked successfully."
In the script, replace the following placeholder:
URLS_TO_UNBLOCK: Provide a list of URLs with each URL in a new line, that you want to unblock.
Follow our guide to upload & publish the script using Scalefusion Dashboard.
Note:
Some of the scripts and their contents are sourced from internet and yes, our new friend ChatGPT.
Please validate the scripts on a test machine before deploying them on all your managed devices.
Scalefusion has tested these scripts, however Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the usage of these scripts.