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
3. Paste the following in the file and modify your settings:
3. Make it executable and loggable:
4. Run it as a crontab:
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
In Dynamic DNS
Share this post:
Responses (10)
-
Accepted Answer
-
Accepted Answer
Can you identify your ibVPN interface with something like "ifconfig", then try adding a route:
The Ip address you need is whatever your Dynamic DNS's updating or checking resolves to.ip route add Dynamic_DNS_updater IP_address dev ibVPN_interface
If you use checkip.dyndns.org, for example, this resolves to multiple IP addresses:
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)[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
-
Accepted Answer
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 -
Accepted Answer
Fargo2 wrote:
I think you'll want iproute2 rather than iptables unless you need to mark the packets first before iproute2 will process them.
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 -
Accepted Answer
-
Accepted Answer
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. -
Accepted Answer
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. -
Accepted Answer
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? -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »