iptables chain for dynamic ip address
The purpose is to lookup IPv4 address of DDNS hostname while append to iptables chain. Run script on CentOS or with minor changes on any Linux, may change line 2 for appropriate path to iptables i.e. debian /etc/default.
host command use a part of the BIND utilities so you need to install them. To install the BIND utilities, type the following:
yum -y install bind-utils
A line contains with your DDNS hostname tagged with
#MyDDNS must be entered into the
iptables configuration file: