A practical shell and Python toolkit built from 15 years of real-world IT operations.
Tyrel Orde Fecha — System Administrator | Network Administrator | DataCenter Ops | DevOps | Cloud Engineer
I started in on-prem and hybrid environments Cisco networks, bare-metal systems, and day-to-day data center operations—then expanded into AWS, automation, and containerized delivery.
This collection reflects that journey: practical tools used to run, troubleshoot, secure, and scale production environments. The current focus extends into Platform Engineering, FinOps, and AIOps while keeping operations simple, reliable, and measurable.
- Cloud / AWS operations
- System administration and health checks
- Networking and DNS diagnostics
- Database operations (MySQL/RDS)
- Storage and file-transfer operations (FTP, SMB/CIFS)
Use the inventory tool to list and categorize everything:
./tool_inventory.py
./tool_inventory.py --json
./tool_inventory.py --category aws
./tool_inventory.py --category network
./tool_inventory.py --category databaseuptime_incidents.example.jsonforuptime_sla_report.pyldap_connect.env.exampleforldap_connect_check.pyredis_health.env.exampleforredis_health_check.pypostgres_health.env.exampleforpostgres_health_check.sh
Quick examples:
./uptime_sla_report.py --input uptime_incidents.example.json --target 99.9
source ldap_connect.env.example && ./ldap_connect_check.py --host "$LDAP_HOST" --port "$LDAP_PORT" --bind-dn "$LDAP_BIND_DN" --bind-password "$LDAP_BIND_PASSWORD" --base-dn "$LDAP_BASE_DN"- Use environment variables or AWS profiles instead of hardcoded credentials
- Keep private deployment details in private repos or private branches
- Rotate any credentials that were ever committed
- Filenames use
snake_casefor both.shand.pyscripts - Prefer verb-first names for action scripts (e.g.,
ec2_launch_instance.py) - Prefer noun-context names for checks/audits (e.g.,
dns_record_audit.sh)
check_instance_status.pycheck_ses_status.pyec2_launch_instance.pyses_check_suppression.pys3_list.pys3_list_by_year.pyaws_billing_report.pyaws_billing_accounts.example.jsonlist_eks_ami_al2023.shssm_connect.shssm_tunnel.shkube_pod_triage.shuptime_sla_report.py
check_domain.shdns_record_audit.shdns_resolver_chain_check.shdns_propagation_drift.shdns_ns_delegation_check.shdns_soa_serial_drift.shdnssec_validation_check.shdns_latency_heatmap.shanycast_resolver_fingerprint.shbgp_asn_context_lookup.shnat_egress_identity_drift.shdns_cache_behavior_probe.shdns_failover_switch_detector.shdns_authoritative_recursive_compare.shdns_split_horizon_detector.shdns_edns_capability_check.shdns_nxdomain_consistency_audit.shnetwork_port_probe.shtcp_port_sweep_summary.shssl_cert_expiry_check.shtcp_connection_watch.shtcp_connect_latency.shtraceroute_path_summary.shsnmp_device_check.shfirewall_rules_audit.shpath_mtu_probe.shinterface_error_watch.shroute_policy_audit.shpacket_loss_jitter_probe.shhttp_timing_breakdown.shinterface_bandwidth_sample.shinterface_route_flap_watch.shpacket_capture_helper.shtls_chain_analyzer.shdhcp_network_metadata.shneighbor_arp_ndp_audit.shmulticast_diagnostics.shwireless_link_audit.shqos_dscp_probe.shpmtu_blackhole_detect.shecn_capability_probe.shsyn_backlog_pressure_check.shtcp_retransmission_hotspots.shwireguard_peer_audit.shwireguard_peer_add.shvpn_route_diagnose.shping_server.ship_address.shipv6_default_route_audit.shipv6_dns_aaaa_drift.shipv6_reachability_matrix.shipv6_path_drift_watch.shipv6_ra_slaac_audit.shipv6_reverse_ptr_check.shipv6_listening_exposure_audit.shipv6_firewall_policy_audit.shipv6_firewall_risky_rules.shipv6_ra_dhcpv6_consistency.shdual_stack_dns_preference_check.shdual_stack_connect_latency_compare.shdual_stack_happy_eyeballs_latency.shdns64_nat64_detection.shipv6_neighbor_cache_pressure.shdual_stack_failover_probe.shresolver_v4_v6_consistency.shipv6_temporary_address_audit.shanycast_path_divergence_watch.shipv6_fragmentation_risk_audit.shdns_udp_doh_parity_check.shspeed_test.pywhat_is_my_ip.pycisco_show_capture.shldap_connect_check.pyssh_hardening_audit.shauth_log_bruteforce_scan.sh
rds_tools.shrds_profile.env.examplemysql_dump_rotate.shredis_health_check.pypostgres_health_check.sh
backup_archive_retention.shbackup_filesystem_prompt.shbackup_filesystem_prompt_legacy_compression.shdisk_usage_hotspots.shlog_retention_cleanup.shcron_job_watchdog.shcertbot_renewal_audit.shlocal_cert_expiry_scan.shftp_mirror_lftp.shsmb_mount_cifs.shfile_integrity_baseline.py
admin_tools_menu.shlinux_system_audit.shsystemd_service_health.shhttp_health_check.shinstall_or_update_docker.shdeploy_container_from_registry.shmax_pods_calculator.shsearch.shpassword_generator.pyfail2ban_jail_audit.shfail2ban_unban_ip.shnginx_config_lint.shapache_vhost_audit.shsudoers_policy_audit.shos_patch_audit.shaccount_security_audit.shworld_writable_scan.shsecurity_baseline_run.sh
cisco_show_capture.sh: read-only Cisco show command capture via SSHdns_record_audit.sh: DNS record audit for domain listsnetwork_port_probe.sh: quick TCP port status checkermysql_dump_rotate.sh: compressed MySQL dumps with retentionftp_mirror_lftp.sh: FTP/FTPS mirror helper withlftpsmb_mount_cifs.sh: SMB/CIFS mount helper using credential fileslinux_system_audit.sh: host audit report generatorrds_tools.sh: rewritten as secure profile-based MySQL/RDS helperaws_billing_report.py: rewritten to use role ARNs from JSON input (no hardcoded accounts/keys)
ssl_cert_expiry_check.sh: checks cert expiry across multiple hostsdisk_usage_hotspots.sh: identifies largest directories/files quicklysystemd_service_health.sh: reports failed/inactive/restarting serviceslog_retention_cleanup.sh: age-based log cleanup with dry-run modetcp_connection_watch.sh: summarizes TCP states and top remote endpoints
firewall_rules_audit.sh: audits ufw/nft/iptables rules plus listening portscron_job_watchdog.sh: validates cron command paths and warns on missing executablessnmp_device_check.sh: basic SNMP reachability and device metadata checkredis_health_check.py: Redis ping/info health with thresholdspostgres_health_check.sh: PostgreSQL connectivity and core health metricskube_pod_triage.sh: finds problematic pods/restarts and recent warning events
tcp_connect_latency.sh: repeated TCP connect latency checks with success/failure statspath_mtu_probe.sh: binary-search MTU probing using DF ping payload teststraceroute_path_summary.sh: traceroute/tracepath collection with compact hop summaryinterface_error_watch.sh: interface error/drop counter sampling with delta alertsdns_resolver_chain_check.sh: compares resolver answers/latency and flags mismatchesroute_policy_audit.sh: audits ip rules/routes/default paths and route lookupsdns_propagation_drift.sh: detects DNS answer drift across public/internal resolverspacket_loss_jitter_probe.sh: ping-based loss and jitter threshold probe per targethttp_timing_breakdown.sh: breaks down DNS/connect/TLS/TTFB/total HTTP timingstcp_port_sweep_summary.sh: scans port list/range and summarizes open/closed resultsdns_ns_delegation_check.sh: compares recursive NS answers with trace delegation setsinterface_bandwidth_sample.sh: samples RX/TX throughput from interface byte countersdns_soa_serial_drift.sh: compares SOA serials across resolvers to detect propagation laginterface_route_flap_watch.sh: watches route-path changes over repeated samplesdnssec_validation_check.sh: checks AD/RRSIG/DNSKEY/DS DNSSEC signals per domainpacket_capture_helper.sh: bounded tcpdump helper with duration/packet limits and dry-run modedns_latency_heatmap.sh: resolver/domain latency table with min/avg/max sample statstls_chain_analyzer.sh: analyzes TLS chain, verify code, protocol/cipher, and expiry windowsanycast_resolver_fingerprint.sh: fingerprints resolver PoPs via CHAOS IDs and latency statsdhcp_network_metadata.sh: collects interface/DHCP lease/default-route/resolver metadatabgp_asn_context_lookup.sh: maps IPv4 targets to origin ASN/prefix/org context via DNS whoisneighbor_arp_ndp_audit.sh: audits neighbor tables for failed/incomplete entries and duplicate MAC patternsnat_egress_identity_drift.sh: tracks public egress IP consistency across providers and roundsmulticast_diagnostics.sh: summarizes multicast addresses/routes/socket state with optional receive probedns_cache_behavior_probe.sh: repeats DNS queries to infer cache acceleration behaviorwireless_link_audit.sh: audits Wi‑Fi link state, signal quality, and driver metadatadns_failover_switch_detector.sh: tracks resolver-order/set switches across sampling roundsqos_dscp_probe.sh: compares loss/latency behavior across DSCP/TOS probe classesdns_authoritative_recursive_compare.sh: compares recursive answers against authoritative NS unionpmtu_blackhole_detect.sh: detects likely PMTU blackhole patterns using DF payload bandsdns_split_horizon_detector.sh: compares internal vs external resolver answer unionsecn_capability_probe.sh: tests endpoint behavior under non-ECN and ECN TOS classesdns_edns_capability_check.sh: checks resolver EDNS/DO behavior across UDP buffer sizessyn_backlog_pressure_check.sh: detects listening socket queue pressure and listen overflow countersdns_nxdomain_consistency_audit.sh: validates NXDOMAIN consistency across resolver settcp_retransmission_hotspots.sh: surfaces retransmission pressure from kernel/socket indicators
ipv6_default_route_audit.sh: audits IPv6 global addressing, default route presence, and route lookupsipv6_dns_aaaa_drift.sh: compares AAAA answers across IPv6 resolvers to detect drift/mismatchipv6_reachability_matrix.sh: runs IPv6 ICMP reachability checks with loss/latency summary table
ipv6_path_drift_watch.sh: tracks IPv6 route-path drift across repeated trace samplesipv6_ra_slaac_audit.sh: audits RA/SLAAC sysctl posture and interface IPv6 address stateipv6_reverse_ptr_check.sh: validates IPv6 PTR records with optional forward AAAA confirmation
ipv6_listening_exposure_audit.sh: flags wildcard IPv6 listeners outside an allowed-port baselineipv6_firewall_policy_audit.sh: audits IPv6 default firewall policy across nftables, ip6tables, and ufwipv6_firewall_risky_rules.sh: scans IPv6 firewall rules for broad allow/risky ACL patterns
ipv6_ra_dhcpv6_consistency.sh: checks RA/SLAAC posture against DHCPv6 client/lease signalsdual_stack_dns_preference_check.sh: compares A/AAAA availability and resolver ordering behaviordual_stack_connect_latency_compare.sh: compares HTTP connect/TTFB/total timings between IPv4 and IPv6
dual_stack_happy_eyeballs_latency.sh: approximates Happy Eyeballs behavior by comparing per-round IPv4/IPv6 connect timing and successdns64_nat64_detection.sh: detects likely DNS64 synthesis patterns (including 64:ff9b::/96 hits)ipv6_neighbor_cache_pressure.sh: monitors degraded IPv6 neighbor-cache state ratio (FAILED/INCOMPLETE)
dual_stack_failover_probe.sh: tests real fallback behavior (IPv6 primary, IPv4 backup)resolver_v4_v6_consistency.sh: compares answer consistency between IPv4 and IPv6 resolver endpointsipv6_temporary_address_audit.sh: audits privacy temporary IPv6 addressing posture per interface
anycast_path_divergence_watch.sh: detects path divergence to anycast targets across repeated tracesipv6_fragmentation_risk_audit.sh: evaluates MTU-based IPv6 fragmentation risk for practical payload thresholdsdns_udp_doh_parity_check.sh: compares classic UDP DNS answers with DoH JSON answers for parity
wireguard_peer_audit.sh: checks peer handshake freshness and transfer countersvpn_route_diagnose.sh: validates interface routes and optional target pingfail2ban_jail_audit.sh: jail and ban count visibilityfail2ban_unban_ip.sh: quick targeted/global IP unban helpercertbot_renewal_audit.sh: certbot inventory plus optional dry-run renewallocal_cert_expiry_scan.sh: scans local cert files for upcoming expiry
wireguard_peer_add.sh: safely appends a peer config and optional live applynginx_config_lint.sh: nginx syntax check plus included config inventoryapache_vhost_audit.sh: Apache syntax/vhost audit and enabled-site listingldap_connect_check.py: LDAP TCP, bind, and optional base DN search validationuptime_sla_report.py: computes SLA uptime from incident windows in JSON
ssh_hardening_audit.sh: checks core sshd hardening settingsauth_log_bruteforce_scan.sh: surfaces repeated failed SSH login sourcessudoers_policy_audit.sh: finds broad sudo privilege and NOPASSWD patternsfile_integrity_baseline.py: baseline and verify file hashes for tamper detectionos_patch_audit.sh: patch/security update visibility across apt/dnf/yumaccount_security_audit.sh: audits UID/account posture and password-policy settingsworld_writable_scan.sh: detects world-writable files and non-sticky writable dirssecurity_baseline_run.sh: runs security audits in one command and stores timestamped reports
security_baseline_run.sh modes:
- default (
--non-strict): fails only when checks return FAIL --strict: fails when checks are FAIL or SKIPPED--skip-check <name>: skip specific checks (repeatable), useful for environment-specific CI--list-checks: print valid check names for use with--skip-check--only-check <name>: run only selected checks (repeatable)--only-group <name>: run by check group (network,deploy,storage; repeatable)--list-groups: print valid group names for use with--only-group--dry-run: preview run/skip decisions and generate a summary without executing checks--output-json: writesummary.jsonfor CI/dashboard parsing--json-pretty: pretty formatted JSON (default)--json-compact: compact single-line JSON output--json-file <path>: custom JSON output file path (relative to report dir or absolute)--json-stdout: print JSON summary directly to stdout (for CI pipes)--quiet: suppress informational logs (useful with--json-stdoutin CI)
CI-friendly example (clean JSON to stdout):
./security_baseline_run.sh \
--dry-run \
--non-strict \
--no-sudo \
--only-group network \
--output-json \
--json-compact \
--json-stdout \
--quietCI artifact example (write JSON to a known path):
./security_baseline_run.sh \
--dry-run \
--non-strict \
--no-sudo \
--only-group network \
--output-json \
--json-compact \
--json-file artifacts/security/summary.json \
--quiet- Company-specific deployment scripts and internal one-off files were removed from this public-ready set.
- Redundant scripts were consolidated (
launch_ec2*, duplicate SES suppression checker, and backup alias entrypoint).
For your current setup, start with one repo and structure by folders:
shell/for bash scriptspython/for Python scriptsprivate/(or separate private repo) for company-specific deployment scripts
When either shell or Python grows into a large standalone toolkit, split into dedicated repos.
The repository includes a GitHub Actions workflow at .github/workflows/ci.yml that is manual-only (workflow_dispatch) and performs:
- shell syntax checks (
bash -nfor all.shfiles) - Python compile checks (
python3 -m compileall -q .) security_baseline_run.shdry-run with JSON artifact output- artifact upload for
artifacts/security/summary.json
This keeps daily script-copy/use workflows noise-free while still allowing an on-demand quality check before publishing major updates.
Before publishing updates, run this quick checklist:
- verify shell syntax:
find . -type f -name "*.sh" -print0 | xargs -0 -n1 bash -n - verify Python syntax:
python3 -m compileall -q . - verify baseline runner JSON path:
./security_baseline_run.sh --dry-run --non-strict --no-sudo --only-group network --output-json --json-compact --json-file ./artifacts/security/summary.json --quiet - run a simple secret-pattern scan:
grep -RInE '(AKIA[0-9A-Z]{16}|aws_secret_access_key|BEGIN (RSA|EC|OPENSSH) PRIVATE KEY|password\s*=\s*"[^"]+")' . \
--exclude-dir=.gitUse pre-commit for local checks before each commit:
python3 -m pip install pre-commit
pre-commit install
pre-commit run --all-filesSee CONTRIBUTING.md for script standards and contribution workflow.