I'm trying to configure Fail2ban to redirect instead of banning, I've found plenty of posts about redirecting to a different port for HTTP traffic to display a different webpage, but I need to redirect to a different IP address entirely. I see the -j REDIRECT function will let me redirect to a different port but not IP Does anyone know how to redirect banned traffic to a specified IP rather than dropping?
iptables-multiport-24.conf
actionstart = iptables -I <chain> -p <protocol> -m multiport --dports <port> -j fail2ban-<name>
actionban = iptables -I fail2ban-<name> 1 -s <ip>/24 -j <blocktype>
jail.local
action = iptables-multiport-24[name=SPAMTRAP, port=smtp, protocol=tcp]
logpath = /var/log/maillog