Skip to content

Commit a601e89

Browse files
committed
ns-ovh-sg → ns-do-sg; +ns-gce
We replace `ns-ovh-sg` with `ns-do-sg`; this is a purely financial decision: `ns-ovh-sg` costs $60/month, $720/year. `ns-do-sg` (Digital Ocean), is also a Singapore-based DNS server. It's a basic-regular-2vcpu-4GiB RAM-80GB SSD-4TiB bandwidth for $24/month, $288/year. That's a yearly savings of $432. I had originally overspec'ed the Singapore server because I suspected that there was a ton of traffic in Asia; I was wrong. It's not even 20% the traffic of Europe or North America. I am confident the Digital Ocean server will be able to handle it. I also reintroduce `ns-gce` as the second server in North America, backing up `ns-hetzner`. My hope is that `ns-hetzner` carries most of the load, and `ns-gce` carries the rest, but not so much as to trigger Google Cloud Platform's (GCP's) expensive bandwidth billing. | DNS server | Queries / second | |:-----------|-----------------:| | ns-hetzner | 10706.4 | | ns-ovh | 10802.0 | | ns-ovh-sg | 1677.7 |
1 parent d34cde3 commit a601e89

File tree

7 files changed

+52
-42
lines changed

7 files changed

+52
-42
lines changed

Docker/sslip.io-dns-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LABEL org.opencontainers.image.authors="Brian Cunnie <[email protected]>"
2626
RUN dnf install -y bind-utils
2727

2828
ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2)
29-
RUN curl -f -L https://github.com/cunnie/sslip.io/releases/download/3.2.7/sslip.io-dns-server-linux-$TARGETARCH \
29+
RUN curl -f -L https://github.com/cunnie/sslip.io/releases/download/3.2.8/sslip.io-dns-server-linux-$TARGETARCH \
3030
-o /usr/sbin/sslip.io-dns-server; \
3131
chmod 755 /usr/sbin/sslip.io-dns-server
3232

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# sslip.io
22

3-
43
[![Production Nameservers](https://github.com/cunnie/sslip.io/actions/workflows/nameservers.yml/badge.svg)](https://github.com/cunnie/sslip.io/actions/workflows/nameservers.yml)
54
[![CI Tests](https://github.com/cunnie/sslip.io/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/cunnie/sslip.io/actions/workflows/ci-tests.yml)
65

@@ -119,21 +118,21 @@ as ARM64 (AWS Graviton, Apple M1/M2).
119118
- `-port` overrides the default port, 53, which the server binds to. This can
120119
be especially useful when running as a non-privileged user, unable to bind to
121120
privileged ports (<1024) ("`listen udp :53: bind: permission denied`"). For
122-
example, to run the server on port 9553: `go run main.go -port 9553`. To query,
123-
`dig @localhost 127.0.0.1.sslip.io -p 9553`
124-
- `-nameservers` overrides the default NS records `ns-hetzner.sslip.io`,
125-
`ns-ovh.sslip.io`, and `ns-ovh-sg.sslip.io`; flag, e.g. `go run main.go
126-
-nameservers ns1.example.com,ns2.example.com`). If you're running your own
127-
nameservers, you probably want to set this. Don't forget to set address records
128-
for the new name servers with the `-addresses` flag (see below). Exception:
129-
`_acme-challenge` records are handled differently to accommodate the
130-
procurement of Let's Encrypt wildcard certificates; you can read more about
131-
that procedure [here](docs/wildcard.md)
121+
example, to run the server on port 9553: `go run main.go -port 9553`. To
122+
query, `dig @localhost 127.0.0.1.sslip.io -p 9553`
123+
- `-nameservers` overrides the default NS records `ns-do-sg.sslip.io`,
124+
`ns-gce.sslip.io`, `ns-hetzner.sslip.io`, and `ns-ovh.sslip.io`; flag, e.g.
125+
`go run main.go -nameservers ns1.example.com,ns2.example.com`). If you're
126+
running your own nameservers, you probably want to set this. Don't forget to
127+
set address records for the new name servers with the `-addresses` flag (see
128+
below). Exception: `_acme-challenge` records are handled differently to
129+
accommodate the procurement of Let's Encrypt wildcard certificates; you can
130+
read more about that procedure [here](docs/wildcard.md)
132131
- `-addresses` overrides the default A/AAAA (IPv4/IPv6) address records. For
133-
example, here's how we set the IPv4 record & IPv6 record for our nameserver (in
134-
the `-nameservers` example above), ns1.example.com: `-addresses
135-
ns1.example.com=10.8.8.8,ns1.example.com=fc::8888`. Note that you can set many
136-
addresses for a single host, e.g.
132+
example, here's how we set the IPv4 record & IPv6 record for our nameserver
133+
(in the `-nameservers` example above), ns1.example.com: `-addresses
134+
ns1.example.com=10.8.8.8,ns1.example.com=fc::8888`. Note that you can set
135+
many addresses for a single host, e.g.
137136
`ns1.example.com=1.1.1.1,ns1.example.com=8.8.8.8,ns1.example.com=9.9.9.9`
138137
- `-blocklistURL` overrides the default block list,
139138
(<https://raw.githubusercontent.com/cunnie/sslip.io/main/etc/blocklist.txt>).
@@ -146,7 +145,7 @@ as ARM64 (AWS Graviton, Apple M1/M2).
146145
- it binds to both UDP and TCP.
147146
- The SOA record is hard-coded except the _MNAME_ (primary master name server)
148147
record, which is set to the queried hostname (e.g. `dig big.apple.com
149-
@ns-ovh.nono.io` would return an SOA with an _MNAME_ record of
148+
@ns.sslip.io` would return an SOA with an _MNAME_ record of
150149
`big.apple.com.`
151150
- The MX records are hard-coded to the queried hostname with a preference of 0,
152151
except `sslip.io` itself, which has custom MX records to enable email

bin/make_all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
66
cd $DIR/..
7-
ldflags="-X xip/xip.VersionSemantic=3.2.7 \
7+
ldflags="-X xip/xip.VersionSemantic=3.2.8 \
88
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
99
-X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)"
1010
export GOOS GOARCH

docs/DEVELOPER.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ These instructions are meant primarily for me when deploying a new release;
44
they might not make sense unless you're on my workstation.
55

66
```bash
7-
export OLD_VERSION=3.2.6
8-
export VERSION=3.2.7
7+
export OLD_VERSION=3.2.7
8+
export VERSION=3.2.8
99
cd ~/workspace/sslip.io
1010
git pull -r --autostash
1111
# update the version number for the TXT record for version.status.sslip.io
@@ -41,13 +41,13 @@ Test from another window:
4141

4242
```bash
4343
export DNS_SERVER_IP=127.0.0.1
44-
export VERSION=3.2.7
44+
export VERSION=3.2.8
4545
# quick sanity test
4646
dig +short 127.0.0.1.example.com @$DNS_SERVER_IP
4747
echo 127.0.0.1
4848
# NS ordering might be rotated
4949
dig +short ns example.com @$DNS_SERVER_IP
50-
printf "ns-hetzner.sslip.io.\nns-ovh.sslip.io.\nns-ovh-sg.sslip.io.\n"
50+
printf "ns-do-sg.sslip.io.\nns-gce.sslip.io.\nns-hetzner.sslip.io.\nns-ovh.sslip.io.\n"
5151
dig +short mx example.com @$DNS_SERVER_IP
5252
echo "0 example.com."
5353
dig +short mx sslip.io @$DNS_SERVER_IP
@@ -84,10 +84,14 @@ git ci -vm"$VERSION: -ns-azure, ns-aws → \"blocked\""
8484
git tag $VERSION
8585
git push
8686
git push --tags
87+
scp bin/sslip.io-dns-server-linux-amd64 ns-do-sg:
8788
scp bin/sslip.io-dns-server-linux-amd64 ns-gce:
8889
scp bin/sslip.io-dns-server-linux-amd64 ns-hetzner:
8990
scp bin/sslip.io-dns-server-linux-amd64 ns-ovh:
90-
scp bin/sslip.io-dns-server-linux-amd64 ns-ovh-sg:
91+
ssh ns-do-sg sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server
92+
ssh ns-do-sg sudo shutdown -r now
93+
# check version number:
94+
sleep 10; while ! dig txt @ns-do-sg.sslip.io version.status.sslip.io +short; do sleep 5; done
9195
ssh ns-gce sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server
9296
ssh ns-gce sudo shutdown -r now
9397
# check version number:
@@ -100,10 +104,6 @@ ssh ns-ovh sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-se
100104
ssh ns-ovh sudo shutdown -r now
101105
# check version number:
102106
sleep 10; while ! dig txt @ns-ovh.sslip.io version.status.sslip.io +short; do sleep 5; done
103-
ssh ns-ovh-sg sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server
104-
ssh ns-ovh-sg sudo shutdown -r now
105-
# check version number:
106-
sleep 10; while ! dig txt @ns-ovh-sg.sslip.io version.status.sslip.io +short; do sleep 5; done
107107
```
108108

109109
- Browse to <https://github.com/cunnie/sslip.io/releases/new> to draft a new release

integration_test.go

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,24 @@ var _ = Describe("sslip.io-dns-server", func() {
238238
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
239239
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
240240
Expect(err).ToNot(HaveOccurred())
241+
Eventually(digSession).Should(Say(`146.190.110.69`))
242+
Eventually(digSession).Should(Say(`104.155.144.4`))
241243
Eventually(digSession).Should(Say(`5.78.115.44`))
242244
Eventually(digSession).Should(Say(`51.75.53.19`))
243-
Eventually(digSession).Should(Say(`51.79.178.89`))
244245
Eventually(digSession, 1).Should(Exit(0))
245-
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeA ns.sslip.io. \? 5.78.115.44, 51.75.53.19, 51.79.178.89\n`))
246+
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeA ns.sslip.io. \? 146.190.110.69, 104.155.144.4, 5.78.115.44, 51.75.53.19\n`))
246247
})
247248
It("returns all the AAAA records", func() {
248249
digArgs = "@localhost aaaa ns.sslip.io +short -p " + strconv.Itoa(port)
249250
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
250251
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
251252
Expect(err).ToNot(HaveOccurred())
253+
Eventually(digSession).Should(Say(`2400:6180:0:d2:0:1:da21:d000`))
254+
Eventually(digSession).Should(Say(`2600:1900:4000:4d12::`))
252255
Eventually(digSession).Should(Say(`2a01:4ff:1f0:c920::`))
253256
Eventually(digSession).Should(Say(`2001:41d0:602:2313::1`))
254-
Eventually(digSession).Should(Say(`2402:1f00:8001:d59::1`))
255257
Eventually(digSession, 1).Should(Exit(0))
256-
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeAAAA ns.sslip.io. \? 2a01:4ff:1f0:c920::, 2001:41d0:602:2313::1, 2402:1f00:8001:d59::1\n`))
258+
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeAAAA ns.sslip.io. \? 2400:6180:0:d2:0:1:da21:d000, 2600:1900:4000:4d12::, 2a01:4ff:1f0:c920::, 2001:41d0:602:2313::1\n`))
257259
})
258260
})
259261
When("there are multiple MX records returned (e.g. sslip.io)", func() {
@@ -274,21 +276,24 @@ var _ = Describe("sslip.io-dns-server", func() {
274276
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
275277
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
276278
Expect(err).ToNot(HaveOccurred())
277-
Eventually(digSession).Should(Say(`flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 6`))
279+
Eventually(digSession).Should(Say(`flags: qr aa rd; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 8`))
278280
Eventually(digSession).Should(Say(`;; ANSWER SECTION:`))
279281
Eventually(digSession).Should(Say(`;; ADDITIONAL SECTION:`))
282+
Eventually(digSession).Should(Say(`ns-do-sg.sslip.io..*146.190.110.69\n`))
283+
Eventually(digSession).Should(Say(`ns-do-sg.sslip.io..*2400:6180:0:d2:0:1:da21:d000\n`))
284+
Eventually(digSession).Should(Say(`ns-gce.sslip.io..*104.155.144.4\n`))
285+
Eventually(digSession).Should(Say(`ns-gce.sslip.io..*2600:1900:4000:4d12::\n`))
280286
Eventually(digSession).Should(Say(`ns-hetzner.sslip.io..*5.78.115.44\n`))
281287
Eventually(digSession).Should(Say(`ns-hetzner.sslip.io..*2a01:4ff:1f0:c920::\n`))
282288
Eventually(digSession).Should(Say(`ns-ovh.sslip.io..*51.75.53.19\n`))
283289
Eventually(digSession).Should(Say(`ns-ovh.sslip.io..*2001:41d0:602:2313::1\n`))
284-
Eventually(digSession).Should(Say(`ns-ovh-sg.sslip.io..*51.79.178.89\n`))
285-
Eventually(digSession).Should(Say(`ns-ovh-sg.sslip.io..*2402:1f00:8001:d59::1\n`))
286290
Eventually(digSession, 1).Should(Exit(0))
287291
// the server names may appear out-of-order
292+
Eventually(string(digSession.Out.Contents())).Should(MatchRegexp(`NS\tns-do-sg.sslip.io.\n`))
293+
Eventually(string(digSession.Out.Contents())).Should(MatchRegexp(`NS\tns-gce.sslip.io.\n`))
288294
Eventually(string(digSession.Out.Contents())).Should(MatchRegexp(`NS\tns-hetzner.sslip.io.\n`))
289295
Eventually(string(digSession.Out.Contents())).Should(MatchRegexp(`NS\tns-ovh.sslip.io.\n`))
290-
Eventually(string(digSession.Out.Contents())).Should(MatchRegexp(`NS\tns-ovh-sg.sslip.io.\n`))
291-
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeNS example.com. \? ns-hetzner.sslip.io., ns-ovh.sslip.io., ns-ovh-sg.sslip.io.\n`))
296+
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeNS example.com. \? ns-do-sg.sslip.io., ns-gce.sslip.io., ns-hetzner.sslip.io., ns-ovh.sslip.io.\n`))
292297
})
293298
})
294299
When(`there are multiple TXT records returned (e.g. SPF for sslip.io)`, func() {
@@ -410,8 +415,8 @@ var _ = Describe("sslip.io-dns-server", func() {
410415
// use regex to account for rotated nameserver order
411416
Entry("an NS record with acme_challenge with a forbidden string is not delegated",
412417
"@localhost _acme-challenge.raiffeisen.fe80--.sslip.io ns +short",
413-
`\Ans-[a-z-]+.sslip.io.\nns-[a-z-]+.sslip.io.\nns-[a-z-]+.sslip.io.\n\z`,
414-
`TypeNS _acme-challenge.raiffeisen.fe80--.sslip.io. \? ns-hetzner.sslip.io., ns-ovh.sslip.io., ns-ovh-sg.sslip.io.\n$`),
418+
`\Ans-[a-z-]+.sslip.io.\nns-[a-z-]+.sslip.io.\nns-[a-z-]+.sslip.io.\nns-[a-z-]+.sslip.io.\n\z`,
419+
`TypeNS _acme-challenge.raiffeisen.fe80--.sslip.io. \? ns-do-sg.sslip.io., ns-gce.sslip.io., ns-hetzner.sslip.io., ns-ovh.sslip.io.\n$`),
415420
Entry("an A record with a forbidden CIDR is redirected",
416421
"@localhost nf.43.134.66.67.sslip.io +short",
417422
`\A52.0.56.137\n\z`,

main.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@ func main() {
1717
var blocklistURL = flag.String("blocklistURL",
1818
"https://raw.githubusercontent.com/cunnie/sslip.io/main/etc/blocklist.txt",
1919
`URL containing a list of non-resolvable IPs/names/CIDRs, usually phishing or scamming sites. Example "file://etc/blocklist.txt"`)
20-
var nameservers = flag.String("nameservers", "ns-hetzner.sslip.io.,ns-ovh.sslip.io.,ns-ovh-sg.sslip.io.",
20+
var nameservers = flag.String("nameservers", "ns-do-sg.sslip.io.,ns-gce.sslip.io.,ns-hetzner.sslip.io.,ns-ovh.sslip.io.",
2121
"comma-separated list of FQDNs of nameservers. If you're running your own sslip.io nameservers, set them here")
2222
var addresses = flag.String("addresses",
2323
"sslip.io=78.46.204.247,"+
2424
"sslip.io=2a01:4f8:c17:b8f::2,"+
25+
"ns.sslip.io=146.190.110.69,"+
26+
"ns.sslip.io=2400:6180:0:d2:0:1:da21:d000,"+
27+
"ns.sslip.io=104.155.144.4,"+
28+
"ns.sslip.io=2600:1900:4000:4d12::,"+
2529
"ns.sslip.io=5.78.115.44,"+
2630
"ns.sslip.io=2a01:4ff:1f0:c920::,"+
2731
"ns.sslip.io=51.75.53.19,"+
2832
"ns.sslip.io=2001:41d0:602:2313::1,"+
29-
"ns.sslip.io=51.79.178.89,"+
30-
"ns.sslip.io=2402:1f00:8001:d59::1,"+
3133
"blocked.sslip.io=52.0.56.137,"+
3234
"blocked.sslip.io=2600:1f18:aaf:6900::a,"+
35+
"ns-do-sg.sslip.io=146.190.110.69,"+
36+
"ns-do-sg.sslip.io=2400:6180:0:d2:0:1:da21:d000,"+
37+
"ns-gce.sslip.io=104.155.144.4,"+
38+
"ns-gce.sslip.io=2600:1900:4000:4d12::,"+
3339
"ns-hetzner.sslip.io=5.78.115.44,"+
3440
"ns-hetzner.sslip.io=2a01:4ff:1f0:c920::,"+
3541
"ns-ovh.sslip.io=51.75.53.19,"+

spec/check-dns_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def get_whois_nameservers(domain)
1818
end
1919

2020
domain = ENV['DOMAIN'] || 'example.com'
21-
sslip_version = '3.2.7'
21+
sslip_version = '3.2.8'
2222
whois_nameservers = get_whois_nameservers(domain)
2323

2424
describe domain do

0 commit comments

Comments
 (0)