Community discussions

MikroTik App
用户头像
hilton
Long time Member
Long time Member
Topic Author
Posts: 634
加入: Thu Sep 07, 2006 5:12 pm
Location:Jozi (aka Johannesburg), South Africa

problem with changeip ddns script

Tue Oct 27, 2009 5:13 pm

Sam, I've encountered a problem with that script of yours.

If I have two scripts running but referencing different interfaces (of course), the update on your server (for both interfaces) only reflects one of the external IP addresses.
Code:Select all
:global ddnsinterface "adsl_unshaped"
and
Code:Select all
:global ddnsinterface "adsl_local"
It works when I disable one of the scripts.

Am I doing something wrong or is this a bug? I think you did enable the round robin thing on my account so not sure if it's this or the script.

Thanks.
Top
changeip
Forum Guru
Forum Guru
Posts: 3828
加入: Fri May 28, 2004 5:22 pm

Re: problem with changeip ddns script

Tue Oct 27, 2009 6:13 pm

Since these are global variables there is expected to be only a single script running per RouterOS. If you are using the Inbound Load Balancing features then the ILB script should do all the work for you, in a single script. If you truly need two different scripts on the same box maybe you can explain the goal and I'll come up with a good solution for you.
Top
用户头像
hilton
Long time Member
Long time Member
Topic Author
Posts: 634
加入: Thu Sep 07, 2006 5:12 pm
Location:Jozi (aka Johannesburg), South Africa

Re: problem with changeip ddns script

Tue Oct 27, 2009 9:47 pm

Ok well here's the problem.

I have one DSL account with normal internet access and then another with local only (local to the country) DSL internet access. Now I normally run the script on the local-only interface because of the cheaper costs. But if someone from outside the country tries to access the router on that IP address it's not accessible due to the local-only bit. So I then create another script for the normal (international) interface.

Am I missing something obvious?

The other problem is say I want the situation where I have 3 ADSL lines connected to the router and I want certain users to connect to a specific line, surely I would need 3 different scripts to obtain a ddns name?
Top
changeip
Forum Guru
Forum Guru
Posts: 3828
加入: Fri May 28, 2004 5:22 pm

Re: problem with changeip ddns script

Wed Oct 28, 2009 8:28 am

所以你想乌利希期刊指南ate more than 1 hostname, each with their own IP?

local.example.com = 1.2.3.4
international.example.com = 2.3.4.5
3rd-dsl.example.com = 5.6.7.8

?

I think this would require multiple scripts. We just need to change some variable names for you to work properly. Global variables that store the interface and IPs need to be unique, so maybe change them to something like "ddnsInterfaceLOCAL", "ddnsInterfaceINTL", etc. If you need more help let me know
Top
用户头像
hilton
Long time Member
Long time Member
Topic Author
Posts: 634
加入: Thu Sep 07, 2006 5:12 pm
Location:Jozi (aka Johannesburg), South Africa

Re: problem with changeip ddns script

Wed Oct 28, 2009 8:29 am

I get it!

Thanks Sam.
Top
smichelsza
刚刚加入了
Posts: 7
加入: Tue Jun 20, 2006 5:07 pm

Re: problem with changeip ddns script

Thu Mar 25, 2010 3:50 pm

Hello,


I am having trouble running the latest script for Mikrotik (ROS 4.6) fromhttp://www.changeip.com/mikrotik/

When running the script from the Terminal command line, I get the following error message :interrupted invalid internal item number

Since the script would not run, I then placed the individual lines from the script in a Terminal to try determine the source of the problem.


When running lines from the script individually, I find an error message at the following line:

:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
invalid internal item number(this is the error message)

Please can you advise if there is another script that can be used which does not stop at ...
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]

in ROS 4.6

Thank you
Top
fewi
Forum Guru
Forum Guru
Posts: 7717
加入: Tue Aug 11, 2009 3:19 am

Re: problem with changeip ddns script

Thu Mar 25, 2010 3:54 pm

Did you correctly adjust the $ddnsinterface variable to reflect your environment? That error could happen because it cannot find an interface with the name you told it to go looking for.
Top

Who is online

Users browsing this forum:Google [Bot],SwissMTand 10 guests