Configuration Reference

Complete reference for /etc/vistoshield/vistoshield.conf — every setting explained.

Configuration File

The main configuration file uses a simple KEY=value format. Lines starting with # are comments. Changes take effect after restarting the daemon:

vistoshield restart

Feature Toggles

Enable or disable individual protection modules. Set to 1 to enable, 0 to disable.

SettingDefaultDescription
FEATURE_RATE_LIMIT1Per-IP request rate limiting
FEATURE_BRUTE_FORCE1Brute force attack detection
FEATURE_BOT_SIGNATURES1User-Agent bot signature matching
FEATURE_LFD1Login Failure Detection (monitors auth logs)
FEATURE_CONN_TRACK1Connection tracking and limiting
FEATURE_COUNTRY_BLOCK0Country-based IP blocking via GeoIP
FEATURE_PORT_FLOOD1Per-port flood detection
FEATURE_SYN_FLOOD1SYN flood protection

Rate Limiting

SettingDefaultDescription
RATE_LIMIT120Maximum requests per minute per IP before temporary block
RATE_LIMIT_BURST20Allowed burst above the rate limit before triggering
RATE_LIMIT_BLOCK_TIME3600Block duration in seconds after rate limit is exceeded

Login Failure Detection (LFD)

Thresholds for individual services. When consecutive failures from the same IP reach the threshold, the IP is blocked.

SettingDefaultDescription
LF_SSHD5SSH login failures before block
LF_FTPD10FTP login failures before block
LF_IMAPD10IMAP login failures before block
LF_POP3D10POP3 login failures before block
LF_SMTPD10SMTP authentication failures before block
LF_DA10DirectAdmin login failures before block
LF_CPANEL10cPanel/WHM login failures before block
LF_WEBMIN10Webmin login failures before block
LF_MODSEC5ModSecurity trigger count before block
LF_BLOCK_TIME3600LFD block duration in seconds
LF_BLOCK_PERM0Set to 1 to make LFD blocks permanent

Connection Tracking

SettingDefaultDescription
CT_LIMIT150Maximum simultaneous connections per IP
CT_INTERVAL30Seconds between connection tracking checks
CT_BLOCK_TIME1800Block duration when connection limit exceeded
CT_PORTS80,443Ports to monitor for connection tracking (comma-separated)

Port Configuration

SettingDefaultDescription
TCP_IN20,21,22,25,53,80,110,143,443,465,587,993,995,2222Allowed inbound TCP ports
TCP_OUT20,21,22,25,53,80,110,113,443,2222Allowed outbound TCP ports
UDP_IN53Allowed inbound UDP ports
UDP_OUT53,113,123Allowed outbound UDP ports

SYN Flood & Port Flood

SettingDefaultDescription
SYNFLOOD1Enable SYN flood protection
SYNFLOOD_RATE100/sSYN packets per second threshold
SYNFLOOD_BURST150SYN burst threshold
PORTFLOOD22;tcp;5;300,80;tcp;30;5Per-port flood limits: port;protocol;hits;seconds

Country Blocking

SettingDefaultDescription
CC_DENY(empty)Comma-separated ISO country codes to block (e.g., CN,RU,KP)
CC_ALLOW(empty)Always allow these countries, even if other rules would block
CC_ALLOW_FILTER0Apply port filtering to allowed countries too

Firewall Backend

SettingDefaultDescription
FW_BACKENDautoForce nftables or iptables, or leave as auto for detection
IPV61Enable IPv6 protection
ICMP_IN1Allow inbound ICMP (ping)
ICMP_OUT1Allow outbound ICMP

Testing Mode

SettingDefaultDescription
TESTING_MODE1Enable testing mode (auto-clears blocks periodically)
TESTING_INTERVAL300Seconds between auto-clear cycles in testing mode
Important: Always start with TESTING_MODE=1 when first deploying. This prevents accidental lockouts. Disable it only after verifying your configuration is correct.

Logging

SettingDefaultDescription
LOG_FILE/var/log/vistoshield/vistoshield.logMain daemon log path
LOG_LEVELinfoLogging verbosity: debug, info, warn, error
LOG_ROTATE1Enable automatic log rotation
LOG_ROTATE_SIZE50MRotate when log exceeds this size
LOG_ROTATE_KEEP7Number of rotated log files to keep

Notifications

SettingDefaultDescription
EMAIL_ALERT1Send email alerts on blocks
EMAIL_TOrootAlert recipient email address
EMAIL_FROMvistoshield@hostnameAlert sender address

Example Minimal Configuration

# /etc/vistoshield/vistoshield.conf — Production example

# Features
FEATURE_RATE_LIMIT=1
FEATURE_BRUTE_FORCE=1
FEATURE_BOT_SIGNATURES=1
FEATURE_LFD=1
FEATURE_CONN_TRACK=1

# Thresholds
RATE_LIMIT=120
LF_SSHD=5
CT_LIMIT=150

# Ports
TCP_IN=22,80,443,2222
TCP_OUT=22,80,443

# Disable testing mode for production
TESTING_MODE=0