Last active
January 29, 2016 10:11
-
-
Save jemyzhang/95b66b8af99b71263300 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/ym/anti-hijack-list.git | |
#replace default server address to local | |
sed -i 's/155.254.49.43/127.0.0.1/g' dnsmasq/hijack.conf | |
sudo ln -s `pwd`/dnsmasq/hijack.conf /etc/dnsmasq.d/ | |
sudo ln -s `pwd`/htdocs /var/www/anti-hijack | |
sudo apt-get install nginx | |
sudo ln -s `pwd`/nginx/hijack.conf /etc/nginx/ | |
sudo vi /etc/NetworkManager/NetworkManager.conf | |
# add dns=dnsmasq at section [main] | |
#sudo service dnsmasq restart | |
#disable dnsmasq, use NM-dnsmasq instead | |
sudo update-rc.d -f dnsmasq disable | |
sudo service nginx restart | |
#link dnsmasq.d to network-manager | |
sudo ln -s /etc/dnsmasq.d /etc/NetworkManager/ | |
sudo service network-manager restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment