Hello,
Currently, I'm running two websites on the same IP with apache virtualhost. One of the sites gets often attacked by bots so what I did is redirect those IPs to a third virtual host that is listening on port 88 and displays a 'your ip has been blocked page'.
What i've used to redirect traffic is:
Code:
iptables -t nat -A PREROUTING -p tcp -s ATTACKING-IP --dport 80 -j REDIRECT --to 88
The question is, can this be done just for incoming traffic to website1?
If an ip has currently a redirect rule in iptables, if it tries to access website1 or website2, it gets redirected to virtualhost:88, i am trying to make it so if an iptables redirect ip tries to access website1, to get redirected to virtualhost:88, but if the same ip tries to access website2, it displays the normal website2,
Can this be done with a single IP?
Thank you!