mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 14:56:17 +00:00
A few fixes
This commit is contained in:
parent
906fb186d2
commit
f595cd9647
1 changed files with 3 additions and 3 deletions
6
x-ui.sh
6
x-ui.sh
|
@ -693,15 +693,15 @@ iplimit_main() {
|
||||||
read -rp "Please enter new Ban Duration in Minutes [default 5]: " NUM
|
read -rp "Please enter new Ban Duration in Minutes [default 5]: " NUM
|
||||||
if [[ $NUM =~ ^[0-9]+$ ]]; then
|
if [[ $NUM =~ ^[0-9]+$ ]]; then
|
||||||
echo -e "\n[3x-ipl]\nenabled=true\nfilter=3x-ipl\naction=3x-ipl\nlogpath=/var/log/3xipl.log\nmaxretry=3\nfindtime=100\nbantime=${NUM}m" > /etc/fail2ban/jail.d/3x-ipl.conf
|
echo -e "\n[3x-ipl]\nenabled=true\nfilter=3x-ipl\naction=3x-ipl\nlogpath=/var/log/3xipl.log\nmaxretry=3\nfindtime=100\nbantime=${NUM}m" > /etc/fail2ban/jail.d/3x-ipl.conf
|
||||||
echo -e "${green}Bantime set to ${NUM} minutes successfully."
|
|
||||||
sudo systemctl restart fail2ban
|
sudo systemctl restart fail2ban
|
||||||
|
echo -e "${green}Bantime set to ${NUM} minutes successfully.${plain}"
|
||||||
else
|
else
|
||||||
echo -e "${red}${NUM} is not a number! Please, try again."
|
echo -e "${red}${NUM} is not a number! Please, try again.${plain}"
|
||||||
fi
|
fi
|
||||||
iplimit_main ;;
|
iplimit_main ;;
|
||||||
3)
|
3)
|
||||||
fail2ban-client reload --restart --unban 3x-ipl
|
fail2ban-client reload --restart --unban 3x-ipl
|
||||||
echo -e "${green}All users Unbanned successfully." ;;
|
echo -e "${green}All users Unbanned successfully.${plain}" ;;
|
||||||
4)
|
4)
|
||||||
if test -f "/var/log/3xipl-banned.log"; then
|
if test -f "/var/log/3xipl-banned.log"; then
|
||||||
cat /var/log/3xipl-banned.log
|
cat /var/log/3xipl-banned.log
|
||||||
|
|
Loading…
Reference in a new issue