CLI Commands

Complete reference for the vistoshield command-line tool used to manage the daemon, firewall rules, and IP blocks.

Daemon Control

CommandDescription
vistoshield startStart the daemon. Loads configuration, applies firewall rules, and begins monitoring.
vistoshield stopStop the daemon gracefully. Firewall rules remain in place.
vistoshield restartStop and restart the daemon. Reloads configuration and reapplies all rules.
vistoshield statusShow daemon status, uptime, number of blocked IPs, and feature states.

IP Management

CommandDescription
vistoshield block <IP> [seconds]Block an IP address. Optional duration in seconds (default: permanent). Supports IPv4, IPv6, and CIDR notation.
vistoshield unblock <IP>Remove an IP from the active block list.
vistoshield listList all currently blocked IPs with block reason, time remaining, and source.
vistoshield list --type <type>Filter blocked IPs by type: lfd, bot, rate, manual, conntrack.
vistoshield allow <IP>Add an IP to the permanent allow list (allow.list).
vistoshield deny <IP>Add an IP to the permanent deny list (deny.list).

Signature Management

CommandDescription
vistoshield update-signaturesDownload and merge latest bot signatures from the VistoShield repository.
vistoshield update-signatures --quietSilent mode for cron jobs — only output on errors.
vistoshield update-geoipUpdate the MaxMind GeoLite2 database for country blocking.

List Management

CommandDescription
vistoshield reload-listsReload allow.list and deny.list without restarting the daemon.
vistoshield flushRemove all temporary blocks. Permanent deny list entries are not affected.
Warning: vistoshield flush removes all active blocks immediately. Use with caution on production servers as previously blocked attackers will regain access until re-detected.

Diagnostics

CommandDescription
vistoshield status --botsShow bot detection statistics: matched signatures, blocked bots, rDNS checks.
vistoshield status --conntrackShow connection tracking stats: top IPs by connection count.
vistoshield check <IP>Check if an IP is currently blocked, allowed, or has recent activity.
vistoshield log [--lines N]Show last N lines from the daemon log (default: 50).
vistoshield versionDisplay the installed VistoShield version.

Usage Examples

Block an IP for 1 hour

vistoshield block 203.0.113.50 3600

Permanently block a CIDR range

vistoshield deny 198.51.100.0/24

Check why an IP was blocked

vistoshield check 203.0.113.50

Sample output:

IP: 203.0.113.50
Status: BLOCKED
Reason: LFD_SSHD (5 failures)
Blocked at: 2026-03-28 14:22:01
Expires at: 2026-03-28 15:22:01
Remaining: 47m 33s

View status summary

vistoshield status

Sample output:

VistoShield v1.0.0 — Running (PID 12345)
Uptime: 3 days, 7 hours
Backend: nftables
Blocked IPs: 142 (IPv4: 128, IPv6: 14)
Features: rate_limit=ON brute_force=ON bot_sigs=ON lfd=ON conn_track=ON
Testing mode: OFF

Auto-update signatures via cron

# Add to root's crontab
0 4 * * * /usr/local/bin/vistoshield update-signatures --quiet
0 3 * * 0 /usr/local/bin/vistoshield update-geoip --quiet

Exit Codes

CodeMeaning
0Success
1General error
2Invalid arguments
3Permission denied (not running as root)
4Daemon not running (for commands that require it)