### Build and Start DNS Server Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md Builds all necessary executables using 'make_all' and then starts the sslip.io DNS server on a specified port. Ensure you are in the project's root directory. ```bash bin/make_all bin/sslip.io-dns-server-darwin-arm64 --port 5333 ``` -------------------------------- ### Self-Hosted DNS Server Installation and Run Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/index.html Instructions for installing and running the sslip.io DNS server within a Docker container on Fedora, including testing with 'dig'. ```bash docker run -it --rm fedora curl -L https://github.com/cunnie/sslip.io/releases/download/5.1.5/sslip.io-dns-server-linux-amd64 -o dns-server chmod +x dns-server ./dns-server 2> dns-server.log & dnf install -y bind-utils dig @localhost 127-0-0-1.nip.io +short ``` -------------------------------- ### IPv4 Hostname Examples Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/index.html Demonstrates various ways to format IPv4 addresses in hostnames for nip.io and sslip.io. ```text https://64.176.22.9.nip.io 64.176.22.9 dot separators, nip.io website mirror (IPv4) ``` ```text https://64-176-22-9.nip.io 64.176.22.9 dash separators, nip.io website mirror (IPv4) ``` ```text www.192.168.0.1.nip.io 192.168.0.1 subdomain ``` ```text www.192-168-0-1.nip.io 192.168.0.1 subdomain + dashes ``` ```text https://www-78-46-204-247.nip.io 78.46.204.247 dash prefix, nip.io website mirror (IPv4) ``` -------------------------------- ### Hexadecimal IPv4 Hostname Example Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/index.html Demonstrates using hexadecimal notation for an IPv4 address in a hostname for nip.io. ```text https://40B01609.nip.io/ 64.176.22.9 nip.io website mirror (hexadecimal notation) ``` -------------------------------- ### IPv6 Hostname Examples Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/index.html Demonstrates various ways to format IPv6 addresses in hostnames for nip.io and sslip.io. IPv6 addresses must use dashes instead of colons. ```text --1.nip.io ::1 IPv6 — always use dashes, never dots ``` ```text https://2a01-4f8-c17-b8f--2.nip.io 2a01:4f8:c17:b8f::2 nip.io website mirror (IPv6) ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-01/README.md Set the Hetzner Cloud token as an environment variable and then initialize and apply the Terraform configuration. This is used for the initial setup of the nameserver. ```bash export TF_VAR_hcloud_token=YOUR_TOKEN_HERE tofu init tofu apply -auto-approve ``` -------------------------------- ### Clone and Run sslip.io DNS Server Source: https://github.com/cunnie/sslip.io/blob/main/README.md Clone the repository, navigate to the directory, install dependencies, and run the DNS server. 'sudo' is required on Linux to bind to port 53. ```bash git clone https://github.com/cunnie/sslip.io.git cd sslip.io go mod tidy sudo go run main.go ``` -------------------------------- ### Testing Custom Domain DNS Resolution Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/index.html Command-line example using 'dig' to test DNS resolution for a custom domain configured with nip.io-style features. ```bash dig @ns-ovh.nip.io. 169-254-169-254.nip.example.com +short ``` -------------------------------- ### Obtain and Install SSL Certificate Source: https://github.com/cunnie/sslip.io/blob/main/terraform/blocked/README.md After deployment, use Certbot to obtain a standalone SSL certificate and restart Nginx. This is necessary if the webserver is not functioning correctly post-deployment. ```bash sudo certbot certonly --standalone --non-interactive --agree-tos --email cunnie@majestic-labs.ai -d blocked.nip.io -d 64.176.22.9.nip.io -d 64-176-22-9.nip.io sudo systemctl restart nginx ``` -------------------------------- ### Update Version in Install Script and Commit Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md Updates the version in a shell script and commits the changes to git. This script is located in the ~/bin directory. ```bash pushd ~/bin sed -i '' "s~/$OLD_VERSION/~/$VERSION/~g" \ ~/bin/install_common.sh git add -p git ci -m"Update sslip.io DNS server $OLD_VERSION → $VERSION" git push popd ``` -------------------------------- ### Force OVH Dedicated Server Reinstall Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-ovh/README.md Use tofu taint to mark the server for reinstallation and then tofu apply to initiate the process. This is useful for forcing a fresh OS installation. ```bash tofu taint ovh_dedicated_server_reinstall_task.server_reinstall tofu apply ``` -------------------------------- ### Custom Domain NS Records Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/index.html Example NS records for a custom domain (e.g., example.com) to enable nip.io-style features on a subdomain (e.g., nip.example.com). ```text hostname IP address Location `ns-00.nip.io.` 167.172.4.236 2400:6180:0:d2:0:2:e3e7:0 Singapore `ns-01.nip.io.` 5.78.28.211 2a01:4ff:1f2:10d:: USA `ns-ovh.sslip.io.` 51.75.53.19 2001:41d0:602:2313::1 Poland ``` -------------------------------- ### Verify DNS NS Record with Docker Setup Source: https://github.com/cunnie/sslip.io/blob/main/README.md Query the DNS server running via Docker to check if the NS record for a given domain resolves correctly to the specified nameserver. This confirms the custom configuration is active. ```bash dig ns 127.0.0.1.com @melkor.nono.io +short ``` -------------------------------- ### Custom Nameserver and Address Configuration Source: https://github.com/cunnie/sslip.io/blob/main/README.md Configure sslip.io to use custom nameservers and map specific IP addresses. This is useful for custom subdomain delegation and air-gapped environments. The example sets up 'xip.pivotal.io' to use two nameservers with their respective IP addresses. ```bash # after we've cloned our repo & cd'ed into it go run main.go \ -nameservers=ns-ip-0.pivotal.io,ns-ip-1.pivotal.io \ -addresses ns-ip-0.pivotal.io=10.8.8.8,ns-ip-1.pivotal.io=fc88:: \ -ptr-domain=xip.pivotal.io ``` -------------------------------- ### Override Default Addresses Source: https://github.com/cunnie/sslip.io/blob/main/README.md Use the -addresses flag to override default A/AAAA records for nameservers. This example sets IPv4 and IPv6 records for ns1.example.com. ```bash go run main.go -addresses ns1.example.com=10.8.8.8,ns1.example.com=fc::8888 ``` -------------------------------- ### Configure PTR Domain for Reverse Lookups Source: https://github.com/cunnie/sslip.io/blob/main/README.md Set the ptr-domain flag to specify the domain for PTR records. This ensures forward and reverse lookups match. Example shows setting ptr-domain to ip.example.com. ```bash ptr-domain=ip.example.com ``` ```bash dig -x 127.0.0.1 ``` -------------------------------- ### Retrieve Server Metrics via TXT Records Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/experimental.html Query the TXT records of metrics.status.nip.io to get server performance data. This is useful for monitoring server uptime, query rates, and other operational statistics. ```bash dig @ns-ovh.nip.io metrics.status.nip.io txt +short ``` -------------------------------- ### Override Default Port Source: https://github.com/cunnie/sslip.io/blob/main/README.md Use the -port flag to change the default server port (53). This is useful for running as a non-privileged user. Example shows running on port 9553. ```bash go run main.go -port 9553 ``` ```bash dig @localhost 127.0.0.1.sslip.io -p 9553 ``` -------------------------------- ### Run sslip.io Tests Source: https://github.com/cunnie/sslip.io/blob/main/README.md After cloning and setting up, run the project's tests to ensure the DNS server is functioning correctly. This includes tidying Go modules, generating necessary files, and executing the tests. ```bash go mod tidy go generate # exclude subdir "spec/", used for testing sslip.io service not code ginkgo -r -p --skip-package=spec . ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-00/README.md Sets the DigitalOcean token as an environment variable and then initializes and applies the Terraform configuration to deploy the nameserver. Ensure the TF_VAR_do_token is set correctly before running. ```bash # Set your DigitalOcean token export TF_VAR_do_token=dop_v1_8dba0xxxxx # Initialize and apply tofu init tofu apply -auto-approve ``` -------------------------------- ### Run sslip.io Tests Locally Source: https://github.com/cunnie/sslip.io/blob/main/README.md Execute the tests for the production nameservers. Ensure the DOMAINS environment variable is set to the desired domains. ```bash DOMAINS=nip.io,sslip.io ginkgo -r -p spec/ ``` -------------------------------- ### Run sslip.io DNS Server with Docker Source: https://github.com/cunnie/sslip.io/blob/main/README.md Deploy the sslip.io DNS server using the official Docker image. This command maps port 53 to the host and runs the server. If port 53 is in use, stop the systemd-resolved service. ```bash docker run \ -it \ --rm \ -p 53:53/udp \ cunnie/sslip.io-dns-server ``` -------------------------------- ### Set Multiple Addresses for a Host Source: https://github.com/cunnie/sslip.io/blob/main/README.md Demonstrates setting multiple IP addresses for a single host using the -addresses flag. ```bash ns1.example.com=1.1.1.1,ns1.example.com=8.8.8.8,ns1.example.com=9.9.9.9 ``` -------------------------------- ### Docker Deployment with Custom Nameservers and Addresses Source: https://github.com/cunnie/sslip.io/blob/main/README.md Run the sslip.io DNS server via Docker, specifying custom nameservers and their associated IP addresses. This allows the Docker container to act as a DNS server for a specific host and its IPs. ```bash docker run \ -it \ --rm \ -p 53:53/udp \ cunnie/sslip.io-dns-server \ -nameservers melkor.nono.io \ -addresses melkor.nono.io=10.9.9.30,melkor.nono.io=2601:645:8103:e3a0:1cc4:a4c5:33cb:d068 ``` -------------------------------- ### Determine Server Version via DNS TXT Record Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/experimental.html Query the TXT record of 'version.status.nip.io' on 'ns-ovh.nip.io' to retrieve the nip.io DNS software version, compilation date, and git hash. ```bash dig @ns-ovh.nip.io version.status.nip.io txt +short ``` -------------------------------- ### Update Fedora OS and Reboot Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-00/README.md Commands to upgrade the Fedora operating system, download the release for version 44, and then perform the system upgrade and reboot. This is necessary if the deployed image is not the latest version. ```bash sudo dnf upgrade --refresh sudo reboot sudo dnf system-upgrade download --releasever=44 sudo dnf system-upgrade reboot ``` -------------------------------- ### Generate sslip.io Log File Source: https://github.com/cunnie/sslip.io/blob/main/docs/logs.md Generates a log file for the sslip.io-dns service from yesterday's logs on an Ubuntu system. ```zsh sudo journalctl -u sslip.io-dns -S yesterday > /tmp/sslip.io.log ``` -------------------------------- ### Upgrade DNS Server on Remote Hosts Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md Upgrades the sslip.io DNS server package on multiple remote hosts via SSH, then reboots each host. Includes a check for the updated version after reboot. ```bash for HOST in ns-00 ns-01 ns-ovh blocked; do ssh $HOST sudo dnf upgrade -y done scp bin/sslip.io-dns-server-linux-amd64 ns-00: scp bin/sslip.io-dns-server-linux-amd64 ns-01: scp bin/sslip.io-dns-server-linux-amd64 ns-ovh: scp bin/sslip.io-dns-server-linux-amd64 blocked: ssh ns-00 sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server ssh ns-00 sudo shutdown -r now # check version number: sleep 10; while ! dig txt @ns-00.nip.io version.status.sslip.io +short; do sleep 5; done ssh ns-01 sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server ssh ns-01 sudo shutdown -r now # check version number: sleep 10; while ! dig txt @ns-01.nip.io version.status.sslip.io +short; do sleep 5; done # wait until it's back up before rebooting ns-ovh ssh ns-ovh sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server ssh ns-ovh sudo shutdown -r now # check version number: sleep 10; while ! dig txt @ns-ovh.sslip.io version.status.sslip.io +short; do sleep 5; done ssh blocked sudo install sslip.io-dns-server-linux-amd64 /usr/bin/sslip.io-dns-server ssh blocked sudo shutdown -r now # check version number: sleep 10; while ! dig txt @blocked.nip.io version.status.sslip.io +short; do sleep 5; done ``` -------------------------------- ### Find Queried Domains (sslip.io) Source: https://github.com/cunnie/sslip.io/blob/main/docs/logs.md Filters log entries to find successful queries for A and AAAA records, extracts domains, normalizes them to lowercase, and counts unique occurrences. ```zsh # find all successful queries of A & AAAA records grep -v '\. \? nil' < /tmp/sslip.io.log | egrep "TypeA | TypeAAAA " | cut -d " " -f 10 > /tmp/hosts.log sed -E 's=.*(\.[^.]+\.[^.]+\.$)=\1=' < /tmp/hosts.log | tr 'A-Z' 'a-z' | sort | uniq -c | sort -n ``` -------------------------------- ### Test sslip.io DNS Resolution Source: https://github.com/cunnie/sslip.io/blob/main/README.md Query the running sslip.io DNS server to verify that it correctly resolves IP addresses from specially crafted DNS records. This test should be run in a separate window. ```bash dig @localhost 192.168.0.1.sslip.io +short ``` -------------------------------- ### Determine External IP Address via DNS TXT Record Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/experimental.html Use 'dig' to query the TXT record of 'ip.nip.io' on 'ns.nip.io' to find your public IPv4 or IPv6 address. This method is bandwidth-efficient compared to HTTP requests. ```bash dig @ns.nip.io txt ip.nip.io +short ``` ```bash dig @ns.nip.io txt ip.nip.io +short -4 ``` ```bash dig @ns.nip.io txt ip.nip.io +short -6 ``` -------------------------------- ### Set Terraform OVH API Environment Variables Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-ovh/README.md Export these environment variables to configure Terraform with your OVH API credentials. Replace YOUR_APPLICATION_SECRET and YOUR_CONSUMER_KEY with your actual keys. ```bash export TF_VAR_ovh_application_key=dmUzEgjQwBIfJbUf export TF_VAR_ovh_application_secret=YOUR_APPLICATION_SECRET export TF_VAR_ovh_consumer_key=YOUR_CONSUMER_KEY ``` -------------------------------- ### Identify Most Frequent DNS Query Sources Source: https://github.com/cunnie/sslip.io/blob/main/docs/logs.md Parses the sslip.io log file to extract source IP addresses, filter out SOA records, normalize them, and count the most frequent ones. ```zsh # Who's querying us the most? awk '{print $8}' < /tmp/sslip.io.log | \ grep -v "nil, SOA" | \ sed 's/\.[0-9]*$//' | \ sort | \ uniq -c | \ sort -n | \ tail -50 ``` -------------------------------- ### Verify Nameserver IP Addresses Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-00/README.md Checks the assigned IPv4 and IPv6 addresses of the nameserver from a different machine using dig. This is crucial for verifying successful deployment and IP assignment. ```bash dig +short 127.0.0.1.nip.io @167.172.4.236 dig +short 127.0.0.1.nip.io @2400:6180:0:d2:0:2:e3e7:0 ``` -------------------------------- ### Update Webservers with New HTML Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md This script updates the HTML files on the webservers. It pulls the latest changes, then uses curl to download new versions of index.html and experimental.html, and a phishing.html file to specific directories. Ensure you have SSH access to the target hosts. ```bash ssh nono.io cd /www/sslip.io/ git pull -r HOST=blocked ssh $HOST sudo curl -L -o /var/www/sslip.io/index.html https://raw.githubusercontent.com/cunnie/sslip.io/main/k8s/document_root_sslip.io/index.html ssh $HOST sudo curl -L -o /var/www/sslip.io/experimental.html https://raw.githubusercontent.com/cunnie/sslip.io/main/k8s/document_root_sslip.io/experimental.html ssh $HOST sudo curl -L -o /var/www/blocked/index.html https://raw.githubusercontent.com/cunnie/sslip.io/main/k8s/document_root_sslip.io/phishing.html ``` -------------------------------- ### Perform DNS Sanity Tests Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md Executes a series of dig commands to test various DNS record types and domain name resolutions against a running DNS server. Assumes DNS_SERVER_IP, VERSION, and PORT are set. ```bash DNS_SERVER_IP=127.0.0.1 VERSION=5.1.5 PORT=5333 # quick sanity test ( dig +short 127.0.0.1.example.com @$DNS_SERVER_IP -p $PORT echo 127.0.0.1 ) | uniq -c # NS ordering might be rotated ( dig +short ns example.com @$DNS_SERVER_IP -p $PORT printf "ns-00.nip.io.\nns-01.nip.io.\nns-ovh.sslip.io.\n" ) | sort | uniq -c ( dig +short mx sslip.io @$DNS_SERVER_IP -p $PORT printf "10 mail.protonmail.ch.\n20 mailsec.protonmail.ch.\n" ) | sort | uniq -c ( dig +short txt nip.io @$DNS_SERVER_IP -p $PORT printf \"protonmail-verification=19b0837cc4d9daa1f49980071da231b00e90b313\" printf \"v=spf1 include:_spf.protonmail.ch mx -all\" ) | sort | uniq -c ( dig +short txt sslip.io @$DNS_SERVER_IP -p $PORT printf \"protonmail-verification=ce0ca3f5010aa7a2cf8bcc693778338ffde73e26\" printf \"v=spf1 include:_spf.protonmail.ch mx -all\" ) | sort | uniq -c ( dig +short txt _dmarc.nip.io. @$DNS_SERVER_IP -p $PORT ; dig +short txt _dmarc.sslip.io. @$DNS_SERVER_IP -p $PORT ; printf \"v=DMARC1; p=reject\" printf \"v=DMARC1; p=reject\" ) | sort | uniq -c dig +short txt 127.0.0.1.sslip.io @$DNS_SERVER_IP -p $PORT # no records dig +short cname sslip.io @$DNS_SERVER_IP -p $PORT # no records ( dig +short cname protonmail._domainkey.sslip.io @$DNS_SERVER_IP -p $PORT echo protonmail.domainkey.dw4gykv5i2brtkjglrf34wf6kbxpa5hgtmg2xqopinhgxn5axo73a.domains.proton.ch. ) | uniq -c ( dig +short A _Acme-ChallengE.127-0-0-1.sslip.io @$DNS_SERVER_IP -p $PORT | grep "^127" printf "127-0-0-1.sslip.io.\t604800\tIN\tA\t127.0.0.1" ) | uniq -c ( dig +short sSlIp.Io @$DNS_SERVER_IP -p $PORT echo 78.46.204.247 ) | uniq -c ( dig +short txt ip.sslip.io @$DNS_SERVER_IP -p $PORT | tr -d '"' echo 127.0.0.1 ) | uniq -c ( dig +short txt version.status.sslip.io @$DNS_SERVER_IP -p $PORT | grep $VERSION echo \"$VERSION\" ) | uniq -c ( dig +short ptr 1.0.0.127.in-addr.arpa @$DNS_SERVER_IP -p $PORT echo "127-0-0-1.nip.io." ) | uniq -c ( dig +short 7f000001.nip.io @$DNS_SERVER_IP -p $PORT echo 127.0.0.1 ) | uniq -c ( dig +short blocked.nip.io @$DNS_SERVER_IP -p $PORT echo 64.176.22.9 ) | uniq -c ( dig +short AAAA blocked.nip.io @$DNS_SERVER_IP -p $PORT echo 2001:19f0:c800:2315:: ) | uniq -c dig +short txt metrics.status.sslip.io @$DNS_SERVER_IP -p $PORT | grep '"Queries: ' echo '"Queries: 18 (?.?/s)"' ``` -------------------------------- ### Update Version Numbers in Files Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md Updates hard-coded version numbers in various configuration and source files using sed. Ensure OLD_VERSION and VERSION environment variables are set correctly. ```bash export OLD_VERSION=5.1.4 export VERSION=5.1.5 cd ~/workspace/sslip.io git pull -r --autostash # update the hard-coded version numbers sed -i '' "s/$OLD_VERSION/$VERSION/g" \ bin/make_all \ spec/spec_suite_test.go \ k8s/document_root_sslip.io/experimental.html \ k8s/document_root_sslip.io/index.html \ Docker/sslip.io-dns-server/Dockerfile \ terraform/ns-00/cloud-init.yaml \ terraform/ns-01/cloud-init.yaml \ terraform/ns-ovh/cloud-init.sh \ terraform/blocked/cloud-init.yaml ``` -------------------------------- ### Override Default Nameservers Source: https://github.com/cunnie/sslip.io/blob/main/README.md The -nameservers flag allows overriding the default NS records. This is useful when running your own nameservers. Remember to set corresponding address records with -addresses. ```bash go run main.go -nameservers ns1.example.com,ns2.example.com ``` -------------------------------- ### Redeploy Blocked Service with Tofu Source: https://github.com/cunnie/sslip.io/blob/main/terraform/blocked/README.md Use these commands to taint and reapply the Terraform configuration for the blocked service. ```bash tofu taint vultr_instance.blocked tofu apply ``` -------------------------------- ### Generate OVH API Consumer Key Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-ovh/README.md Use this curl command to generate a Consumer Key for OVH API access. Ensure you replace placeholders with your actual Application Key and desired access rules. ```bash curl -s -X POST https://api.us.ovh.cloud/1.0/auth/credential \ -H "Content-Type: application/json" \ -H "X-Ovh-Application: dmUzEgjQwBIfJbUf" \ -d '{"accessRules":[{"method":"GET","path":"/*"},{"method":"PUT","path":"/*"},{"method":"POST","path":"/*"},{"method":"DELETE","path":"/*"}]}' \ | jq . ``` -------------------------------- ### Identify Users Querying ip.sslip.io Source: https://github.com/cunnie/sslip.io/blob/main/docs/logs.md Extracts and counts unique IP addresses that are querying the ip.sslip.io domain for TXT records, excluding SOA records. ```zsh # Who's trying to find out their own IP via ip.sslip.io? sudo journalctl --since yesterday -u sslip.io-dns | \ grep -v "nil, SOA" | \ grep "TypeTXT ip.sslip.io" | \ sed 's/.*TypeTXT ip.sslip.io. ? \["//; s/"\]$//' | \ sort | \ uniq -c ``` -------------------------------- ### Retrieve Available IP Addresses from OVH API Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-ovh/README.md This script fetches available IP addresses from the OVH API. It constructs the necessary headers including a SHA1 signature based on your credentials and the API endpoint. ```bash TS=$(date +%s) URL=https://api.us.ovh.cloud.com/1.0/ip SIG='$1$'$(echo -n "${TF_VAR_ovh_application_secret}+${TF_VAR_ovh_consumer_key}+GET+${URL}++${TS}" | sha1sum | cut -d' ' -f1) curl -s "$URL" \ -H "X-Ovh-Application: $TF_VAR_ovh_application_key" \ -H "X-Ovh-Consumer: $TF_VAR_ovh_consumer_key" \ -H "X-Ovh-Timestamp: $TS" \ -H "X-Ovh-Signature: $SIG" ``` -------------------------------- ### Commit and Tag New Release Source: https://github.com/cunnie/sslip.io/blob/main/docs/DEVELOPER.md Commits staged changes with a versioned message, creates a git tag for the new version, and pushes both the commit and tags to the remote repository. ```bash GIT_MESSAGE="$VERSION: new \"blocked\" webserver: blocked.nip.io" git add -p git ci -vm"$GIT_MESSAGE" git tag $VERSION git push git push --tags ``` -------------------------------- ### Find Most Looked-up IP Addresses Source: https://github.com/cunnie/sslip.io/blob/main/docs/logs.md Analyzes the hosts.log file to identify and count the most frequently looked-up IP addresses. ```zsh # find the most looked-up IP addresses using the above hosts.log sort < /tmp/hosts.log | uniq -c | sort -n | tail -50 ``` -------------------------------- ### Override Blocklist URL Source: https://github.com/cunnie/sslip.io/blob/main/README.md The -blocklistURL flag allows specifying a custom blocklist. If the blocklist cannot be downloaded, the server logs a message and continues operation. ```bash go run main.go -blocklistURL https://raw.githubusercontent.com/cunnie/sslip.io/main/etc/blocklist.txt ``` -------------------------------- ### Destroy Terraform Resources Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-01/README.md Use the destroy command to remove the resources managed by Terraform. Note that Terraform will not delete Floating IPs. ```bash tofu destroy ``` -------------------------------- ### Display Full URL on Page Load Source: https://github.com/cunnie/sslip.io/blob/main/k8s/document_root_sslip.io/phishing.html This JavaScript function retrieves the current page's full URL and displays it in an HTML element with the ID 'url'. It is executed automatically when the page finishes loading. ```javascript function displayURL() { var urlSpan = document.getElementById('url'); var fullURL = window.location.href; // Gets the full URL urlSpan.textContent = fullURL; // Sets the full URL as text content of the span } window.onload = displayURL; // Calls the function when the page loads ``` -------------------------------- ### Control Public IP Address Resolution Source: https://github.com/cunnie/sslip.io/blob/main/README.md The public flag controls whether public IP addresses are resolved. Setting -public=false resolves only private IP addresses, preventing potential security risks. ```bash -public=false ``` -------------------------------- ### Destroy Terraform Resources Source: https://github.com/cunnie/sslip.io/blob/main/terraform/ns-00/README.md Command to destroy the DigitalOcean droplet managed by Terraform. Use this command to clean up all deployed resources. ```bash tofu destroy -target=digitalocean_droplet.nameserver -auto-approve ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.