Community discussions

MikroTik App
 
tesna
just joined
Topic Author
Posts: 1
Joined: Fri Jun 15, 2012 1:04 pm

OpenVPN client connecting to dynamic dns host

Tue Jul 03, 2012 6:22 pm

I have openvpn client running sucessfully on my RouterBoard 751G. But I'm facing a little problem. The openvpn server (not an routeros machine) has dynamic IP which has its A record automatically updated (dynamic dns, I use afraid.org) if the IP is changed. I have several remote location using dd-wrt and tomato firmware with openvpn enabled and has able to re-establishes connection automatically if the openvpn server IP is changed.

But not the case with RouterBoard. It appears when I enter a hostname in the connect to field its automatically convert it to the current A record of that DNS record, so when the dns record is updated routeros still trying to connect with the same IP without lookingup the dns records. Is there any way to fix this?
 
bassist
just joined
Posts: 12
Joined: Fri Jun 29, 2012 4:33 pm

Re: OpenVPN client connecting to dynamic dns host

Thu Jul 05, 2012 12:09 am

Yeah, I found this for a few fields where I would have liked to of put the DNS record in there rather than the IP address.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: OpenVPN client connecting to dynamic dns host

Thu Jul 05, 2012 5:54 pm

There is currently no magic way to use host names in MikroTik when using services like that. What you can do however is script it to update every so often.
    :local DDNSip 0;
    :set DDNSip [:resolve host.afraid.org]
    interface ovpn-client set connect-to=$DDNSip
Run this every so often to update the IP address. You could also make the script more sophisticated by storing the host IP in a global variable and only updating the openvpn client when it changes. Look at some user supplied scripts to see how to do this, namely the DDNS update scripts.
 
giuseppe01
just joined
Posts: 6
Joined: Sun Nov 18, 2012 9:58 pm

Re: OpenVPN client connecting to dynamic dns host

Sat Dec 08, 2012 3:15 pm

i have same problem. But the simple script don't work.
Can you help me?
thanks.
 
giuseppe01
just joined
Posts: 6
Joined: Sun Nov 18, 2012 9:58 pm

Re: OpenVPN client connecting to dynamic dns host

Fri Dec 14, 2012 8:11 pm

i'm solved
:local DDNSip 0; :set DDNSip [:resolve "quetepasa.dyndns.org"]; interface ovpn-client set connect-to=$DDNSip numbers=0
just add number connection

Who is online

Users browsing this forum: jaclaz, saluki, tyrasuki and 39 guests