I'm following this tutorial to setup keepalived: https://www.redhat.com/sysadmin/keepalived-basics
It requires two hosts to share one external IP, where the second host is the failover.
I'm unsure how to go about this, and I have been searching for a good while, without success.
I've come with this idea in /etc/shorewall/nat
, but I'm sure it'll mess things up:
# proxy1
1.2.3.4 eth0 192.168.0.10 No No
# proxy2
1.2.3.4 eth0 192.168.0.11 No No
And then have these rules:
# proxy1
Web/DNAT net dmz:192.168.0.10 - - - 1.2.3.4
# proxy2
Web/DNAT net dmz:192.168.0.11 - - - 1.2.3.4
I have done no testing as we have no testing environment for firewall configurations, so changes are generally risky. shorewall check
does not show any errors with this.
Will this work or completely mess up web traffic? If it doesn't work, how should I otherwise solve this problem?
Any help will be greatly appreciated.