From c8829a784052b8fc186a581fca9e719d2f8611f9 Mon Sep 17 00:00:00 2001 From: rskntroot Date: Tue, 17 Jun 2025 22:07:10 +0000 Subject: [PATCH] + docs updates --- mkdocs/docs/coding/oxpasta.md | 66 +++++++++++++++++++ mkdocs/docs/coding/r53-ddns.md | 42 +++++++----- mkdocs/docs/projects/network.md | 65 ++++++++++++++---- .../{enterprise_nas.md => soho_nas.md} | 0 4 files changed, 143 insertions(+), 30 deletions(-) rename mkdocs/docs/storage/{enterprise_nas.md => soho_nas.md} (100%) diff --git a/mkdocs/docs/coding/oxpasta.md b/mkdocs/docs/coding/oxpasta.md index e69de29..cbff160 100644 --- a/mkdocs/docs/coding/oxpasta.md +++ b/mkdocs/docs/coding/oxpasta.md @@ -0,0 +1,66 @@ +# oxpasta + +A minimal shell script for interacting with a [rustypaste](https://github.com/orhun/rustypaste) server + +[https://github.com/rskntroot/oxpasta](https://github.com/rskntroot/oxpasta) + +## Brief + +As someone who needed quick access to only a handful of features, [rpaste](https://github.com/orhun/rustypaste-cli) was overkill. As such, this shell only provides shortcuts for 3 features: upload, oneshot (-o), and url shortening (-s). + +## Help + +``` zsh +Usage: oxpasta [OPTION] FILE + +Options: + [none] {file} Upload a file + -o, --oneshot {file} Upload a file as a oneshot link + -s, --shorten-url {url} Shorten a given URL + -h, --help Display this help message + +Description: + minimal rustypaste cli script + +Requires: + export OXP_SERVER="https://example.com" + +Examples: + oxpasta /path/to/file + | Uploads the file located at /path/to/file + oxpasta -o /path/to/file + | Uploads the oneshot URL https://example.com + oxpasta -s https://example.com/long/url + | Shortens the URL to https:/// +``` + +## Setup + +1. save `oxpasta.sh` file + + +1. symlink `oxpasta` + ``` zsh + sudo ln -s /path/to/oxpasta.sh /usr/local/bin/oxpasta + ``` + +1. set server url + ``` zsh + echo 'export OXP_SERVER="https://"' >> ~/.bashrc + source ~/.bashrc + ``` + +## Example + +``` zsh +$ git clone https://github.com/rskntroot/oxpasta.git +$ echo $PATH | grep -o '/usr/local/sbin' +$ sudo ln -s /home/${USER}/workspace/oxpasta/oxpasta.sh /usr/local/bin/oxpasta +$ +$ sha256sum oxpasta/oxpasta.sh > file && cat file +8fb227774b7f24c22b1437303af7bcd222b4bd058563576102f87c351595deb0 workspace/oxpasta/oxpasta.sh +$ oxpasta file +https://paste.rskio.com/unsolicitous-fredricka.txt +$ curl https://paste.rskio.com/unsolicitous-fredricka.txt +8fb227774b7f24c22b1437303af7bcd222b4bd058563576102f87c351595deb0 workspace/oxpasta/oxpasta.sh +``` diff --git a/mkdocs/docs/coding/r53-ddns.md b/mkdocs/docs/coding/r53-ddns.md index 1834055..42b6c15 100644 --- a/mkdocs/docs/coding/r53-ddns.md +++ b/mkdocs/docs/coding/r53-ddns.md @@ -14,20 +14,18 @@ This is intended to be installed on a public-facing loadbalancer. ## Assumptions -1. Your ISP randomly changes your PublicIP and that pisses you off. +1. Your ISP randomly changes your PublicIP and that upsets you. 1. You just want something that will curl `ipv4.icanhazip.com`, check 3rd-party dns, and update Route53. -1. Your Name records only contain a single IP. (future update maybe). +1. Your Name records only contain a single IP. If so, this is for you. ## Setup - -1. setup `Route53AllowRecordUpdate.policy` - ```zsh - DNS_ZONE_ID=YOURZONEIDHERE \ - envsubst < aws.policy > Route53AllowRecordUpdate.policy - ``` -1. in aws, create IAM user, attach policy, generate access keys for automated service +1. get +1. in [aws console](https://console.aws.amazon.com): + - create IAM user + - attach policy `aws.policy` file provided + - generate access keys for automated service 1. log into aws cli with the account you created above ``` aws configure @@ -36,14 +34,18 @@ If so, this is for you. ``` zsh ln -sf ~/r53-ddns/target/release/r53-ddns /usr/bin/r53-ddns ``` +1. get your hosted_zone_id + ``` zsh + aws route53 list-hosted-zones + ``` 1. setup systemd service and then install as normal - ```zsh + ``` zsh DNS_ZONE_ID=YOURZONEIDHERE \ DOMAIN_NAME=your.domain.com. \ - envsubst < r53-ddns.service | sudo tee -a /etc/systemd/system/r53-ddns.service + envsubst < r53-ddns.service | sudo tee /etc/systemd/system/r53-ddns.service ``` -## CLI Usage +## Usage ``` $ r53-ddns -h @@ -54,6 +56,7 @@ Usage: r53-ddns --dns-zone-id --domain-name Options: -z, --dns-zone-id DNS ZONE ID (see AWS Console Route53) -d, --domain-name DOMAIN NAME (ex. 'docs.rskio.com.') + -s, --seconds SECONDS refresh timer in seconds [default: 180] -h, --help Print help ``` @@ -73,7 +76,9 @@ sudo systemctl status r53-ddns.service ``` ``` -$ systemctl status r53-ddns.service +$ envsubst < r53-ddns.service | sudo tee /etc/systemd/system/r53-ddns.service +$ sudo systemctl enable --now r53-ddns.service +$ sudo systemctl status r53-ddns.service ● r53-ddns.service - Route53 Dynamic DNS Service Loaded: loaded (/etc/systemd/system/r53-ddns.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2024-07-29 09:03:40 UTC; 7min ago @@ -86,18 +91,19 @@ $ systemctl status r53-ddns.service Jul 29 09:03:40 hostname systemd[1]: Started Route53 Dynamic DNS Service. Jul 29 09:03:40 hostname r53-ddns[215630]: [2024-07-29T09:03:40Z INFO r53_ddns] starting with options: -z [##TRUNCATED##] -d rskio.com. +Jul 29 09:03:40 hostname r53-ddns[215630]: [2024-07-29T09:03:40Z INFO r53_ddns] current public address is: 10.0.0.1 Jul 29 09:09:41 hostname r53-ddns[215630]: [2024-07-29T09:09:41Z INFO r53_ddns::dns] dynamic ip drift detected: 10.0.0.1 -> 71.211.88.219 Jul 29 09:09:41 hostname r53-ddns[215630]: [2024-07-29T09:09:41Z INFO r53_ddns::route53] requesting update to route53 record for A rskio.com. -> 71.211.88.219 Jul 29 09:09:41 hostname r53-ddns[215630]: [2024-07-29T09:09:41Z INFO r53_ddns::route53] change_id: /change/C02168177BNS6R50C32Q has status: Pending Jul 29 09:10:41 hostname r53-ddns[215630]: [2024-07-29T09:09:41Z INFO r53_ddns::route53] change_id: /change/C02168177BNS6R50C32Q has status: Insync ``` -## Q&A +## FAQs -> Why did you do create this monster in rust? +> Does this handle multiple record updates? -To be able to handle errors in the future. +No. The goal here was for a single server to sync its dns record. If you are running multiple services from the same host, then consider using CNAMEs to point at a global A|AAAA record for this to update. -> wen IPv6? +> What if I need to update only a single address in the record? -It should work with IPv6. +Let me know. I have been considering this use-case, but haven't implemented it yet. diff --git a/mkdocs/docs/projects/network.md b/mkdocs/docs/projects/network.md index 3e8bd11..5e7d8cf 100644 --- a/mkdocs/docs/projects/network.md +++ b/mkdocs/docs/projects/network.md @@ -1,33 +1,60 @@ # Premium Home Network +## Brief + Welcome to my recommended HomeLab network setup! Here’s a breakdown of the key components. -- by `rskntroot` on `2025-02-22` +- by `rskntroot` on `2025-06-17` --- -## Premium Build +## Components ### Router -**Unifi [Dream Machine Special Edition](https://techspecs.ui.com/unifi/unifi-cloud-gateways/udm-se)** -- All-in-one gateway with security, routing, and network management. + +=== "USDM" + + **Unifi [Dream Machine Special Edition](https://techspecs.ui.com/unifi/unifi-cloud-gateways/udm-se)** + + - All-in-one gateway with security, routing, and network management. + - Provides 10Gb/s SFP ports + +=== "Max" + + **Unifi [Cloud Gateway Max](https://techspecs.ui.com/unifi/cloud-gateways/ucg-max)** + + - All-in-one gateway with security, routing, and network management. + - Provides 2.5Gb/s SFP ports + - Limited Camera/NVR storage --- ### Switching -=== "Standard" +=== "Premium" **Unifi [Pro Max 24 PoE](https://techspecs.ui.com/unifi/switching/usw-pro-max-24)** + - **Price:** $799 USD - **Specs:** - 8 × 2.5GbE PoE++ - 16 × 1GbE PoE++ @ 400W - 2 × 10G SFP+ uplinks +=== "Standard" + + **Cisco [WS-C3650-12X48UQ-S](https://www.ebay.com/itm/365350985160)** + + - **Price** $130 USD + - **Specs:** + - 12 × 100Mbps/1/2.5/5/10 Gbps PoE+ @820W shared + - 36 × 10/100/1000 Gbps PoE+ @820W shared + - 4 × 10G SFP+ + === "Cheaper" **Mokerlink [8-Port 2.5Gb PoE Switch](https://www.amazon.com/dp/B0C7VT8TVB/)** + - **Price:** $89 USD - **Specs:** - 8 × 2.5GbE PoE+ @@ -35,6 +62,7 @@ Welcome to my recommended HomeLab network setup! Here’s a breakdown of the key - 135W Total PoE **2x Amcrest [8-Port 1Gb PoE Switch](https://www.amazon.com/dp/dp/B08FCQ8BRC/)** + - **Price:** $79 USD x2 - **Specs:** - 8 × 1GbE PoE+ @@ -43,13 +71,24 @@ Welcome to my recommended HomeLab network setup! Here’s a breakdown of the key --- ### WiFi -**Unifi [U7 Pro](https://techspecs.ui.com/unifi/wifi/u7-pro)** -- WiFi 7 access points with strong coverage and performance. + +=== "Wifi7" + + **Unifi [U7 Pro](https://techspecs.ui.com/unifi/wifi/u7-pro)** + + - WiFi 7 access points with strong coverage and performance. + +=== "Wifi6" + + **Unifi [U6 Pro](https://techspecs.ui.com/unifi/wifi/u6-pro)** + + - WiFi 6 access points with strong coverage and performance. --- ### Cameras -- **Unifi [G5 Bullet](https://techspecs.ui.com/unifi/cameras-nvrs/uvc-g5-bullet)** + +**Unifi [G5 Bullet](https://techspecs.ui.com/unifi/cameras-nvrs/uvc-g5-bullet)** - 4MP resolution, HDR, AI motion detection. --- @@ -57,12 +96,14 @@ Welcome to my recommended HomeLab network setup! Here’s a breakdown of the key ## Network Attached Storage #### 6-Bay NAS -- **UGREEN [DXP6800 PRO](https://www.ugreen.com/collections/nas-storage/products/ugreen-nasync-dxp6800-pro-nas-storage)** -- See [Personal NAS](../storage/personal_nas.md) for setup details. + + **UGREEN [DXP6800 PRO](https://www.ugreen.com/collections/nas-storage/products/ugreen-nasync-dxp6800-pro-nas-storage)** + - See [Personal NAS](../storage/personal_nas.md) for setup details. #### 8-Bay NAS -- **UGREEN [DXP9800 PRO](https://www.ugreen.com/collections/nas-storage/products/ugreen-nasync-dxp8800-plus-nas-storage)** -- See [Enterprise NAS](../storage/enterprise_nas.md) for more details. + + **UGREEN [DXP9800 PRO](https://www.ugreen.com/collections/nas-storage/products/ugreen-nasync-dxp8800-plus-nas-storage)** + - See [Enterprise NAS](../storage/soho_nas.md) for more details. --- diff --git a/mkdocs/docs/storage/enterprise_nas.md b/mkdocs/docs/storage/soho_nas.md similarity index 100% rename from mkdocs/docs/storage/enterprise_nas.md rename to mkdocs/docs/storage/soho_nas.md