rin as root and correct validator
This commit is contained in:
6
debian/fail2ban-p2p.service
vendored
6
debian/fail2ban-p2p.service
vendored
@@ -6,10 +6,10 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=fail2ban-p2p
|
||||
Group=fail2ban-p2p
|
||||
User=root
|
||||
Group=root
|
||||
EnvironmentFile=-/etc/default/fail2ban-p2p
|
||||
ExecStart=/usr/bin/python3 /usr/share/fail2ban-p2p/fail2ban-p2p.py -c /etc/fail2ban-p2p $DAEMON_OPTS
|
||||
ExecStart=/usr/bin/python3 /usr/bin/fail2ban-p2p.py -c /etc/fail2ban-p2p $DAEMON_OPTS
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
NoNewPrivileges=true
|
||||
|
||||
@@ -49,7 +49,7 @@ def isIPv4address(str):
|
||||
'''
|
||||
|
||||
try:
|
||||
reIPv4 = "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
|
||||
reIPv4 = r"(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
|
||||
if re.match(reIPv4, str):
|
||||
return True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user