BOSH release: 2.5.0: block phishers

This commit is contained in:
Brian Cunnie
2022-02-06 19:41:43 -08:00
parent 5afb911f50
commit 51ed47317e
9 changed files with 52 additions and 11 deletions

View File

@@ -4,7 +4,7 @@
# #
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/../src/sslip.io-dns-server cd $DIR/../src/sslip.io-dns-server
ldflags="-X xip/xip.VersionSemantic=2.4.2 \ ldflags="-X xip/xip.VersionSemantic=2.5.0 \
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \ -X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
-X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)" -X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)"
export GOOS GOARCH export GOOS GOARCH

View File

@@ -83,6 +83,10 @@ builds:
version: df5ffc9ec5c9fc30f607f7cc76b794577065e20282673b748722428456b28a6d version: df5ffc9ec5c9fc30f607f7cc76b794577065e20282673b748722428456b28a6d
blobstore_id: 255ab1bc-1f92-4013-4300-22c2f2efa39e blobstore_id: 255ab1bc-1f92-4013-4300-22c2f2efa39e
sha1: sha256:14f0df3489754079cde355badf8382126ebc8519eb40cb15e44ac30a45b3c2d4 sha1: sha256:14f0df3489754079cde355badf8382126ebc8519eb40cb15e44ac30a45b3c2d4
edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27:
version: edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27
blobstore_id: 36ad0840-3dcd-4b0d-4550-0ece77007743
sha1: sha256:25d4d67beedd6926f36d7c9be765495c1a31173a0c2da86d9a28bc916e928dfb
f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e: f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e:
version: f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e version: f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e
blobstore_id: 7f1b9c5b-1eb2-4761-5212-f857dbf704d3 blobstore_id: 7f1b9c5b-1eb2-4761-5212-f857dbf704d3

View File

@@ -5,9 +5,9 @@ source /var/vcap/packages/golang-1-linux/bosh/compile.env
mkdir src ${BOSH_INSTALL_TARGET}/bin mkdir src ${BOSH_INSTALL_TARGET}/bin
mv sslip.io-dns-server/{go.*,main.go,xip} src/ mv sslip.io-dns-server/{go.*,main.go,xip} src/
cd src/ cd src/
ldflags="-X xip/xip.VersionSemantic=2.4.2 \ ldflags="-X xip/xip.VersionSemantic=2.5.0 \
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \ -X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
-X xip/xip.VersionGitHash=1e6fae4" -X xip/xip.VersionGitHash=7831e3c"
go build \ go build \
-ldflags="$ldflags" \ -ldflags="$ldflags" \
-o ${BOSH_INSTALL_TARGET}/bin/sslip.io-dns-server -o ${BOSH_INSTALL_TARGET}/bin/sslip.io-dns-server

View File

@@ -1,6 +1,8 @@
builds: builds:
1c4de423-584b-42b9-59ab-93a123c96307: 1c4de423-584b-42b9-59ab-93a123c96307:
version: 1.2.0 version: 1.2.0
2b0eb400-814f-4ce4-6046-c1cfda040d70:
version: 2.5.0
43640b61-afe3-4bc0-79ed-4e279f286041: 43640b61-afe3-4bc0-79ed-4e279f286041:
version: 2.4.1 version: 2.4.1
516ea48d-0717-494d-4082-9d8f0ab937df: 516ea48d-0717-494d-4082-9d8f0ab937df:

View File

@@ -0,0 +1,23 @@
name: sslip.io
version: 2.5.0
commit_hash: ae8dee5
uncommitted_changes: false
jobs:
- name: sslip.io-dns-server
version: 308acb7c186a042bc2ca4c28b83c9fe7589a64c48ab6a11869c442bcaea8fdf9
fingerprint: 308acb7c186a042bc2ca4c28b83c9fe7589a64c48ab6a11869c442bcaea8fdf9
sha1: sha256:6ca6f2c11816a82ecb3cf9300ea59369977cbaa7c39eddca35628a7c6b9b5b45
packages:
- sslip.io-dns-server
packages:
- name: golang-1-linux
version: 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06
fingerprint: 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06
sha1: sha256:1f4f73a903b8f59b46d9a8ff813961615126b843eafa991c7dc950ae9a2a0bf1
dependencies: []
- name: sslip.io-dns-server
version: edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27
fingerprint: edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27
sha1: sha256:25d4d67beedd6926f36d7c9be765495c1a31173a0c2da86d9a28bc916e928dfb
dependencies:
- golang-1-linux

View File

@@ -4,8 +4,8 @@ These instructions are meant primarily for me when deploying a new BOSH release;
they might not make sense unless you're on my workstation. they might not make sense unless you're on my workstation.
```bash ```bash
export OLD_VERSION=2.4.1 export OLD_VERSION=2.4.2
export VERSION=2.4.2 export VERSION=2.5.0
cd ~/workspace/sslip.io cd ~/workspace/sslip.io
git pull -r --autostash git pull -r --autostash
# update the version number for the TXT record for version.status.sslip.io # update the version number for the TXT record for version.status.sslip.io
@@ -20,15 +20,20 @@ sed -i '' "s~/$OLD_VERSION/~/$VERSION/~g" \
# update the git hash for the TXT record for version.status.sslip.io for BOSH release # update the git hash for the TXT record for version.status.sslip.io for BOSH release
sed -i '' "s/VersionGitHash=[0-9a-fA-F]*/VersionGitHash=$(git rev-parse --short HEAD)/g" \ sed -i '' "s/VersionGitHash=[0-9a-fA-F]*/VersionGitHash=$(git rev-parse --short HEAD)/g" \
bosh-release/packages/sslip.io-dns-server/packaging bosh-release/packages/sslip.io-dns-server/packaging
# let's get the BOSH creds
cd bosh-release/ cd bosh-release/
lpass show a # refresh LastPass token lpass show a # refresh LastPass token
. ~/workspace/deployments/.envrc # set BOSH auth . ~/workspace/deployments/.envrc # set BOSH auth
export BOSH_DEPLOYMENT=sslip.io-dns-server export BOSH_DEPLOYMENT=sslip.io-dns-server
# create the BOSH release
bosh create-release --force bosh create-release --force
# upload the release
bosh upload-release bosh upload-release
# deploy the release
bosh -n -d sslip.io-dns-server deploy ~/workspace/deployments/sslip.io-dns-server.yml --recreate bosh -n -d sslip.io-dns-server deploy ~/workspace/deployments/sslip.io-dns-server.yml --recreate
bosh instances # record the IP address of the instance # find the IP of the deployed DNS server
IP=$(bosh is --json | jq -r '.Tables[0].Rows[0].ips') IP=$(bosh is --json | jq -r '.Tables[0].Rows[0].ips'); echo $IP
# run the tests!
dig +short 127.0.0.1.example.com @$IP dig +short 127.0.0.1.example.com @$IP
echo 127.0.0.1 echo 127.0.0.1
dig +short ns example.com @$IP dig +short ns example.com @$IP
@@ -65,18 +70,25 @@ echo " ===" # separator because the results are too similar
dig @$IP my-key.k-v.io txt +short # returns nothing dig @$IP my-key.k-v.io txt +short # returns nothing
dig @$IP metrics.status.sslip.io txt +short | grep '"queries: ' dig @$IP metrics.status.sslip.io txt +short | grep '"queries: '
echo '"queries: 16"' echo '"queries: 16"'
# pop up a directory
pushd .. pushd ..
# let's add our changes
git add -p git add -p
git ci -vm"BOSH release: $VERSION: kv.sslip.io key-value store" # and commit (but DON'T push)
git ci -vm"BOSH release: $VERSION: block phishers"
popd popd
# upload the blobs
bosh upload-blobs bosh upload-blobs
# create the release
bosh create-release \ bosh create-release \
--final \ --final \
--tarball ~/Downloads/sslip.io-release-${VERSION}.tgz \ --tarball ~/Downloads/sslip.io-release-${VERSION}.tgz \
--version ${VERSION} --version ${VERSION}
# add the changes
git add -N releases/ .final_builds/ git add -N releases/ .final_builds/
git add -p git add -p
git ci --amend git ci --amend
# tag the release
git tag $VERSION git tag $VERSION
git push git push
git push --tags git push --tags

View File

@@ -26,7 +26,7 @@ LABEL maintainer="brian.cunnie@gmail.com"
RUN apk update && apk add bind-tools RUN apk update && apk add bind-tools
ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2) ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2)
RUN wget https://github.com/cunnie/sslip.io/releases/download/2.4.2/sslip.io-dns-server-linux-$TARGETARCH \ RUN wget https://github.com/cunnie/sslip.io/releases/download/2.5.0/sslip.io-dns-server-linux-$TARGETARCH \
-O /usr/sbin/sslip.io-dns-server; \ -O /usr/sbin/sslip.io-dns-server; \
chmod 755 /usr/sbin/sslip.io-dns-server chmod 755 /usr/sbin/sslip.io-dns-server

View File

@@ -156,7 +156,7 @@ src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]-->
example, we install & run our server within a docker container:</p> example, we install & run our server within a docker container:</p>
<pre> <pre>
docker run -it --rm fedora docker run -it --rm fedora
curl -L https://github.com/cunnie/sslip.io/releases/download/2.4.2/sslip.io-dns-server-linux-amd64 -o dns-server curl -L https://github.com/cunnie/sslip.io/releases/download/2.5.0/sslip.io-dns-server-linux-amd64 -o dns-server
chmod +x dns-server chmod +x dns-server
./dns-server 2&gt; dns-server.log & ./dns-server 2&gt; dns-server.log &
dnf install -y bind-utils dnf install -y bind-utils

View File

@@ -18,7 +18,7 @@ def get_whois_nameservers(domain)
end end
domain = ENV['DOMAIN'] || 'example.com' domain = ENV['DOMAIN'] || 'example.com'
sslip_version = '2.4.2' sslip_version = '2.5.0'
whois_nameservers = get_whois_nameservers(domain) whois_nameservers = get_whois_nameservers(domain)
describe domain do describe domain do