Ad Widget

Collapse

Proxy Multiple Server IP Fail-Over

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • low10sws6
    Member
    • Oct 2008
    • 44

    #1

    Proxy Multiple Server IP Fail-Over

    So have a question

    I have 2 ISPs
    One fails everything is Nat'd to the other ISP ( No BGP )

    except now we have a Differnet ISP with a different IP Address

    This causes a problem for the Server to Proxy and Proxy to Server to failover and continue monitoring in case of an outage, bc of the static ip set in the proxy (Correct) or can we use mutliple IPs that will failover if ones not reachable

    and if not this would be an awesome addition Similar to the agent which seems to have failover in place.

    I also thought about an Internal DNS on the Proxy to have to Static known IP set for a hostname. and have the zabbix proxy config server=hostname

    and ideas on a temporary solution

    Sometime in the future will be using BGP.

    but for now what can be done

    DNS on every proxy?
    Cron Job Script?
    etc
    IDEAs?
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    You could set up an iptables rule to DNAT for you.

    I'm going to talk about this in general terms.
    - Server A needs to talk to Server B. Server B has two different upstream connections(ISPs)
    -- ISP1 - 1.2.3.4
    -- ISP2 - 5.6.7.8
    - Communication is one way, A -> B

    - On Server A choose a dummy address for A to use when calling B. The address should be on the same subnet as A. (ie A=192.168.1.10 B=192.168.1.11) The second IP should not actually exist on the network
    - Write a script which "pings" both of the ip addresses for server B. The script will determine which IP address to use.
    - The script will also setup an iptables rule which listens to the localhost ip address (127.0.0.5) and then does a DNAT translation on the packet for the selected upstream IP address of server B. The rule will look something similar to the following:
    -- iptables -A OUTPUT -d 192.168.1.11 -j DNAT --to-destination 1.2.3.4
    - Run the script periodically and change the DNAT rule if needed. ie:
    -- iptables -A OUTPUT -d 192.168.1.11 -j DNAT --to-destination 5.6.7.8 (failover)

    Hopefully this gives you some ideas. The iptables rules are setup either on the host itself (A) or on the Linux firewall between A and the Internet. Connections from B to A do not require these hurdles.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    Working...