firewall_pleroma_rejects: Filter out wildcard domains.
This commit is contained in:
parent
42c9f843ec
commit
2ac4393621
|
@ -4,7 +4,7 @@
|
||||||
# BE CAREFUL: Some instances may run under a shared IP, you may block more than
|
# BE CAREFUL: Some instances may run under a shared IP, you may block more than
|
||||||
# you want. Watch out for timeouts in the logs. No warranties and so on.
|
# you want. Watch out for timeouts in the logs. No warranties and so on.
|
||||||
|
|
||||||
# Version: 2019-07-20_1
|
# Version: 2019-08-15_1
|
||||||
|
|
||||||
# You can modify the ignore-list in
|
# You can modify the ignore-list in
|
||||||
# "${XDG_CONFIG_HOME}/firewall_pleroma_rejects/ignorelist.user",
|
# "${XDG_CONFIG_HOME}/firewall_pleroma_rejects/ignorelist.user",
|
||||||
|
@ -29,6 +29,11 @@ function get_ips() # Outputs IPs, separated by newline.
|
||||||
{
|
{
|
||||||
local domain="${1}"
|
local domain="${1}"
|
||||||
|
|
||||||
|
# Filter out wildcard domains.
|
||||||
|
if [[ "${domain}" =~ '\*' ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# Resolve aliases.
|
# Resolve aliases.
|
||||||
local realdomain="${domain}"
|
local realdomain="${domain}"
|
||||||
while [[ -n "${realdomain}" ]]; do
|
while [[ -n "${realdomain}" ]]; do
|
||||||
|
|
Loading…
Reference in New Issue