The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cheap IP Takeover: Accomplish IP takeover with ping, bash, & network utility ?

Discussion in 'General Discussion' started by hostmedic, Mar 27, 2006.

  1. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    Has anyone tried to perform an IP takeover with ping, bash, and a simple network utility as described online here:

    http://hacks.oreilly.com/pub/h/63

    PHP:
    #!/bin/bash
    OTHER="brain"
    PUBLIC="208.201.239.37"

    PAUSE=3

    PATH
    =/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin
    MISSED
    =0

    while true; do 
    if ! 
    ping -c 1 -w 1 $OTHER > /dev/nullthen 
    ((MISSED++))
    else
    if [ 
    $MISSED -gt 2 ]; then
    ifconfig eth0
    :$OTHER down
    fi
    MISSED
    =0
    fi


    if [ 
    $MISSED -eq 2 ]; then
    ifconfig eth0
    :$OTHER $PUBLIC
    #
    # ...but see discussion below...
    #
    fi
    sleep $PAUSE

    done
    I am looking to see if this has been done ? successfully ?
     
  2. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    anyone?

    anyone done this with success?
     
  3. expedio

    expedio Active Member

    Joined:
    Jun 30, 2007
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    We have successfully designed and implemented cpanel clusters with full data redundancy and automatic failover without IP change.

    PM me for more details.
     

Share This Page