Smoothwall I/O
- User Agent: CCBot/2.0 (https://commoncrawl.org/faq/)
- X-Forwarded-For: 3.238.134.157
- Remote IP: 3.238.134.157
- Country: US
This is where you can get started with special tools that are used by Smoothwall Engineers and partners, if you don't know what a particular tool does, then leave well alone.
Some CLI Fun
- User count:
find /var/log/usercache/ -name "*.sqlite3" -exec sqlite3 {} "select strftime('%Y-%m-%d',datetime(timestamp,'unixepoch')), count(*) from data group by 1;" \;
- Unique IP count:
find /var/log/woodshed/*/guardian3/idx -name "*.idx3" -mtime -7 -exec sqlite3 {} "select strftime('%Y-%m-%d',datetime(date,'unixepoch')), count(DISTINCT ip) from data group by 1;" \;
- Take a full backup:
su -c '/usr/bin/smoothwall/backupall.pl $(date +%Y%m%d_%H%M)' nobody
- Bandwidth logs:
find /var/log/woodshed/*/traffic/idx/ -type f -name "*.idx3" -exec sqlite3 {} "select strftime('%Y-%m-%d',date,'unixepoch'), protocol, max(bytes) from data where direction = 'out' group by 2;" \;
- Bandwidth logs with IP:
find /var/log/woodshed/*/traffic/idx/ -type f -name "*.idx3" -exec sqlite3 {} "select strftime('%Y-%m-%d',date,'unixepoch'), protocol, address, max(bytes) from data where direction = 'in' group by 2;" \;
- Send me your stats:
curl --upload-file /var/log/dansguardian3/error.log https://smoothwall.io/g3stats