Forums

Mansoor
Mansoor
Offline
Resolved
1 votes
For anyone having a domain name with enom and wants to dynamically link it without using external programs, here is how:

1. Assign a password to the domain name in enom control panel.

2. Create a new script
nano /root/enom_dyn_dns_update.sh

3. Paste the following in the file and modify your settings:
#!/bin/sh
wget --no-check-certificate -O- "https://dynamic.name-services.com/interface.asp?\
command=SetDnsHost\
&HostName=@\
&Zone=yourdomain.com\
&DomainPassword=yourpassword\
&Address="`wget -qO- http://checkip.dyndns.org | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"`


3. Make it executable and loggable:
chmod +x /root/enom_dyn_dns_update.sh
touch /var/log/enom_dyn_dns


4. Run it as a crontab:
nano /etc/crontab
*/15 * * * * root /root/enom_dyn_dns_update.sh >> /var/log/enom_dyn_dns
Friday, September 15 2017, 09:04 PM
Share this post:
Responses (10)
  • Accepted Answer

    Tuesday, September 26 2017, 05:01 PM - #Permalink
    Resolved
    0 votes
    You can duplicate each group of lines in the conf file or use DNS-O-Matic or for some DDNS providers, they accept multiple domains in a single update. Have a look at the examples in /etv/ddclient.conf.
    The reply is currently minimized Show
  • Accepted Answer

    Cam J
    Cam J
    Offline
    Tuesday, September 26 2017, 02:08 AM - #Permalink
    Resolved
    0 votes
    Any way to do multiple domains?
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 17 2017, 06:20 PM - #Permalink
    Resolved
    0 votes
    Can you identify your ibVPN interface with something like "ifconfig", then try adding a route:
    ip route add Dynamic_DNS_updater IP_address dev ibVPN_interface
    The Ip address you need is whatever your Dynamic DNS's updating or checking resolves to.

    If you use checkip.dyndns.org, for example, this resolves to multiple IP addresses:
    [root@server ~]# host checkip.dyndns.org
    checkip.dyndns.org is an alias for checkip.dyndns.com.
    checkip.dyndns.com has address 216.146.43.71
    checkip.dyndns.com has address 216.146.38.70
    checkip.dyndns.com has address 216.146.43.70
    checkip.dyndns.com has address 91.198.22.70
    What you'd need to do here is choose one of the IP's and put it in your hosts file as well - or set up multiple routes, one for each IP address (and there may be more than 4)
    The reply is currently minimized Show
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Sunday, September 17 2017, 05:48 PM - #Permalink
    Resolved
    0 votes
    Thanks for the suggestion Nick.

    I've been trying to do it the easy way, but without any luck so far! I created a virtual interface with an IP address. Then, I added that IP to the ibVPN app, so it gets routed via the VPN link. After that, I ran the "wget" command and bonded it to the virtual IP like this:

    BIND_ADDR="192.168.1.248" LD_PRELOAD=/usr/lib/bind64.so wget -qO- http://checkip.dyndns.org

    The wget runs, but it returns my normal remote internet IP, not that of the VPN.

    In addition to bind, I also tried other tools as mentioned here: https://superuser.com/questions/241178/how-to-use-different-network-interfaces-for-different-processes

    I even assigned a namespace to the virtual interface, and tried to execute the "wget" using iproute2 like the following:
    ip netns exec foo wget -qO- http://checkip.dyndns.org

    Non of my trials worked out; and I'll keep experimenting :)
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 17 2017, 07:59 AM - #Permalink
    Resolved
    0 votes
    Fargo2 wrote:
    As for the VPN IP, yes I'm using the ClearOS app for ibVPN, which is similar to OpenVPN as you descried it. I think I need to read more about iptables in order to be able to do it :)
    I think you'll want iproute2 rather than iptables unless you need to mark the packets first before iproute2 will process them.
    The reply is currently minimized Show
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Saturday, September 16 2017, 11:30 PM - #Permalink
    Resolved
    0 votes
    Strange! I tested it with dnsomatic.com first but it didn't work. It always shows Error status!

    As for the VPN IP, yes I'm using the ClearOS app for ibVPN, which is similar to OpenVPN as you descried it. I think I need to read more about iptables in order to be able to do it :)
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 16 2017, 06:57 PM - #Permalink
    Resolved
    0 votes
    One way to update Enom with ddclient is to use the free DNS-O-Matic service. You can use ddclient to update this (I do for my OpenDNS account) and it can then update further DynDNS services for you, but if you've already got it working your way you may as well leave it.

    Re the VPN IP. Are you using the ClearOS app? I've never seen it and can't because I don't have an ibVPN account, but does it just allow you to send various LAN PC's traffic through the VPN, but no ClearOS traffic? I think it is another OpenVPN type service, so what you may be able to do is us a destination based route to redirect traffic to a particular IP down the correct tun interface. If you use a different service from Enom you may be able to direct that service's server traffic through the VPN.
    The reply is currently minimized Show
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Saturday, September 16 2017, 04:04 PM - #Permalink
    Resolved
    0 votes
    Unfortunately, ddclient did not work for me. I even tried some Windows clients, but they all couldn't update 'enom' domains.

    As for the ibVPN, I'm trying to fetch the internet IP assigned to me by ibVPN. One way I'm thinking of is to route inquiries to checkip.dyndns.org via the VPN. This could be done using 'ip aliasing' maybe or some other technique.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 16 2017, 07:56 AM - #Permalink
    Resolved
    0 votes
    Doesn't ddclient work? It is a great dynamic IP updater and saves you having to repeatedly hit dyndns's server which is a third party server. ddclient can either be run as a daemon where it loops every 5 minutes or so, or it can be run from /etc/dhcp/dhclient-exit-hooks (preferable only triggering on IP changes, but that needs minor scripting).

    For ibVPN, are you trying to find the IP of your exit node? If so, don't you have to do something similar with your IP checking bit being routed through the VPN?
    The reply is currently minimized Show
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Friday, September 15 2017, 09:09 PM - #Permalink
    Resolved
    0 votes
    In a related issue, I also need to get the remote IP address for a ibVPN connection from the server. I'd appreciate any help or suggestion in this regard.

    Thank you.
    The reply is currently minimized Show
Your Reply