Skip to content

Instantly share code, notes, and snippets.

@bitbeans
Created February 28, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitbeans/9af1e62b0f0934c333da0b65dac8d436 to your computer and use it in GitHub Desktop.
Save bitbeans/9af1e62b0f0934c333da0b65dac8d436 to your computer and use it in GitHub Desktop.
Install dnscrypt server on a vultr.com container
#!/bin/sh
apt-get update
apt-get upgrade -y
ufw enable
ufw allow 22
ufw allow 443
export SERVER=$(hostname)
export SERVER_IP=`ip route get 1 | awk '{print $NF;exit}'`
echo $SERVER
echo $SERVER_IP
docker run --name=dnscrypt-server -p 443:443/udp -p 443:443/tcp --net=host jedisct1/dnscrypt-server init -N $SERVER -E $SERVER_IP:443
docker update --restart=unless-stopped dnscrypt-server
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock v2tec/watchtower dnscrypt-server
docker update --restart=unless-stopped watchtower
docker cp dnscrypt-server:/opt/dnscrypt-wrapper/etc/keys /root
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment