Reply To: Multiple WAN interfaces and Dynamic DNS

Home Page Forums Network Management ZeroShell Multiple WAN interfaces and Dynamic DNS Reply To: Multiple WAN interfaces and Dynamic DNS

#50516

iulyb
Member

Hi,
You can try to use a DDNS service that accept the IP as a variable and then use a script to extract the IP and post it to DDNS server.
I use Joker on my domain and has this options.

You will need about a 4 lines script that will go into cron section.


#/bin/bash

#get IPs
IP1=$(ifconfig ETH01 | awk '/inet addr/{print substr($2,6)}')
IP2=$(ifconfig ETH02 | awk '/inet addr/{print substr($2,6)}')

#post IPs
curl "http://svc.joker.com/nic/update?username=xxxxx&password=xxxx&hostname=bla.bla.com&ip=$IP1"
curl "http://svc.joker.com/nic/update?username=xxxxx&password=xxxx&hostname=bla.bla.com&ip=$IP2"