mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
- Add comprehensive wiki documentation under .github/wiki/ (19 articles) - Add READMEs to directories that lacked them - Fix merge conflict markers in existing READMEs - Update root readme.md with improved structure Co-authored-by: Jarvis <jarvis@wickedyoda.local>
1.7 KiB
1.7 KiB
snmp
Overview
Scripts for setting up SNMP (Simple Network Management Protocol) monitoring on various platforms.
Files
| Script | Platform | Version |
|---|---|---|
setup_snmp.sh |
Linux | SNMPv3 |
setup_snmp_openwrt.sh |
OpenWrt | SNMPv3 |
setup_snmp_openwrt_v2.sh |
OpenWrt | SNMPv3 (alternative) |
setup_snmp_openwrt_publicv2.sh |
OpenWrt | SNMPv2 (public) |
Setup_snmp_macos.sh |
macOS | SNMPv3 |
Linux SNMP Setup
setup_snmp.sh
sudo ./snmp/setup_snmp.sh
What it does:
- Prompts for SNMPv3 credentials
- Installs snmpd and snmp packages
- Configures SNMPv3 with authPriv (MD5+AES)
- Sets up firewall rules
- Starts and enables SNMP service
Configures:
/etc/snmp/snmpd.conf- Access restricted to local network
OpenWrt SNMP Setup
SNMPv3
ssh root@10.0.84.1
# Run on router
curl -sSL https://raw.githubusercontent.com/wickedyoda/public-setupfiles/main/snmp/setup_snmp_openwrt.sh | sh
Interactively prompts for:
- SNMPv3 username
- Password
- System location
- System contact
macOS SNMP Setup
Setup_snmp_macos.sh
# Install dependencies first
brew install net-snmp
# Then run script
sudo ./snmp/Setup_snmp_macos.sh
SNMP Monitoring
Test Connection
# From remote system
snmpwalk -v2c -c public 10.0.84.1 system
# Or SNMPv3
snmpwalk -v3 -u admin -l authPriv -a MD5 -A "password" \
-x AES -X "password" 10.0.84.1 system
Grafana Integration
Use any Prometheus/Grafana SNMP exporter with the configured community strings.
Security
- Use SNMPv3 with authPriv whenever possible
- Restrict SNMP to management network
- Change default community strings
- Do not expose to the internet