-
Notifications
You must be signed in to change notification settings - Fork 0
/
iodine_client_setup.bash
61 lines (53 loc) · 1.44 KB
/
iodine_client_setup.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/env bash
echo "Installing IODINE"
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git make build-essential pkg-config zlib1g-dev net-tools openssh-server iputils-ping netcat dnsutils libtext-lorem-perl sshpass asciinema
cd /opt
git clone https://github.com/yarrick/iodine.git
cd /opt/iodine
make
make install
echo "[+] Installing DoH-client for transparent UDP to DoH conversion"
# Install GO
curl -OL https://golang.org/dl/go1.16.7.linux-amd64.tar.gz
sudo tar -C /usr/local -xvf go1.16.7.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
mkdir ~/gopath
export GOPATH=~/gopath
# Install dns-over-https client
git clone https://github.com/m13253/dns-over-https.git
cd dns-over-https/
make
sudo make install
# Confiugure dns-over-https client
cat << EOF > /etc/dns-over-https/doh-client.conf
# DNS listen port
listen = [
"127.0.0.1:53",
"127.0.0.1:5380",
"[::1]:53",
"[::1]:5380",
]
[upstream]
upstream_selector = "random"
[[upstream.upstream_ietf]]
url = "https://192.168.0.10/dns-query"
weight = 50
[others]
bootstrap = []
passthrough = []
timeout = 30
no_cookies = true
no_ecs = false
no_ipv6 = false
no_user_agent = false
verbose = true
insecure_tls_skip_verify = true
EOF
# Enable/disable, start/stop systemd services
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
sudo systemctl start doh-client.service
sudo systemctl enable doh-client.service
systemctl daemon-reload