DDNS

Discussion in 'General' started by patspidy, Mar 16, 2011.

  1. patspidy

    Joined:
    May 13, 2010
    Messages:
    14
    Likes Received:
    0
    I'm trying to implement the following solution: and elastix PBX behind a dual WAN firewall. When one WAN link breaks, the firewall automatically switches over to the other WAN link. The problem is this: my SIP trunk provider does not work with DNS---IP only. I understand that the sip_general_custom.conf file has the line externip=12.34.56.78 and that this is vital to the communication with the SIP trunk provider. My question is this: is there any way to set up Dynamic DNS on the PBX itself so that when the WAN link switches from the primary to the secondary (on the firewall), the sip_general_custom.conf file is updated accordingly thereby allowing continued communicatons with the SIP trunk provider?
     
  2. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    yeap with an script made by you that changes the status of the wan port when ti detects the change
     
  3. patspidy

    Joined:
    May 13, 2010
    Messages:
    14
    Likes Received:
    0
    Would you have any idea how to create such a script?
     
  4. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    i have to be brutally honest and i hope u will not get it in the hard way... yes i know how to do it but not for free and in a community forum...im here to help but to help to get into the way of learning...
    1 option will be using bash and cron to have a heart beat to a ping address using one or the other wan routes and if fail changing the default routes to the other wan gateway
    or the easies way...buy a cisco rv042 dual wan with autoload balancing and backup failover function for less than 300 bucks
     
  5. netaires

    Joined:
    Apr 13, 2010
    Messages:
    218
    Likes Received:
    1
    I think it could solve your problem by performing a script with the following information:

    ifconfig eth0 <allowable_unused_IP_address_in_your_network-your Elastix's IP> netmask <netmask_of_your_network>

    route add default gw <address_of_your_router> eth0

    Example:

    extenWAN_1.sh
    ifconfig eth0 192.168.1.120 netmask 255.255.255.0
    route add default gw 192.168.1.1 eth0

    extenWAN_2.sh
    ifconfig eth0 192.168.1.120 netmask 255.255.255.0
    route add default gw 192.168.1.2 eth0

    Should be noted that not automatic when your ISP goes down. You should run the script manually.
     

Share This Page