tcp – iptables/haproxy limit packets per second

iptables -A INPUT -p tcp --dport 1234 -m state --state NEW -j ACCEPT

iptables -I INPUT -p tcp --dport 1234 -m hashlimit --hashlimit-mode srcip,srcport --hashlimit-name HASHNAME --hashlimit-htable-max 5000 --hashlimit-htable-expire 10000 --hashlimit-above 5/sec -j DROP

Source: tcp – iptables/haproxy limit packets per second – Server Fault

tcp – iptables/haproxy limit packets per second was last modified: April 29th, 2022 by Jovan Stosic

Help needed – Cron job not working with HA OS – Configuration

Instead of Cron jobs you could schedule it directly into HA using automation and shell commands. I have tons of these that I use for various purposes and doing it in HA has the added benefit of being able to set conditions on which scripts to execute and when. For example, here is what I use to truncate my log every hour:

shell_commands.yaml:

shell_rotate_log: '/config/logreset.sh'

automation:

alias: 'Schedule: Clear Logs Each Hour'
description: ''
trigger:
  - platform: time_pattern
    hours: /1
    minutes: '59'
condition: []
action:
  - service: shell_command.shell_rotate_log
    data: {}
mode: single

Source: Help needed – Cron job not working with HA OS – Configuration – Home Assistant Community

Help needed – Cron job not working with HA OS – Configuration was last modified: April 25th, 2022 by Jovan Stosic