mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
tunneldigger-broker: add rate-limit hook
Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
This commit is contained in:
committed by
Nick Hainke
parent
49cdf15da4
commit
0d1085fe9e
17
net/tunneldigger-broker/files/hook-connection-rate-limit
Executable file
17
net/tunneldigger-broker/files/hook-connection-rate-limit
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ENDPOINT_IP="$1"
|
||||
ENDPOINT_PORT="$2"
|
||||
UUID="$3"
|
||||
|
||||
# This assumes that an ipset was created with something like
|
||||
# ```
|
||||
# ipset create create tunneldigger_blocked hash:ip family inet timeout 300
|
||||
# ```
|
||||
# and that a firewall rule like the following uses the ipset to block connections:
|
||||
# ```
|
||||
# -A INPUT -m set --match-set tunneldigger_blocked src -j DROP
|
||||
# ```
|
||||
|
||||
#ipset add tunneldigger_blocked "$ENDPOINT_IP"
|
||||
Reference in New Issue
Block a user