Page 1 of 1

mikrotik script generation error

Posted: 30 Jan 2020, 11:02
by chris865
hi there,

i get error on the generation of the walledgarden script on the dns part

/ip dns
set allow-remote-requests=no cache-max-ttl=1w cache-size=2048KiB servers=DNS1,DNS2
:for i from=0 to=([/ip dhcp-server network print count-only]-1) do={/ip dhcp-server network set dns-server= }
/ip hotspot set [find name="our hotspot"] keepalive-timeout=0s
:foreach i in [/ip hotspot profile find] do={
:local loginby [/ip hotspot profile get $i login-by];
:local LoginbyEncoded
:foreach item in=$loginby do={
:if ($item != "https") do={
:set $LoginbyEncoded ($LoginbyEncoded .$item.",");
}
}
/ip hotspot profile set $i login-by=$LoginbyEncoded;
/ip hotspot profile set numbers=$i dns-name=""
}

the script bombs out on this - servers=DNS1,DNS2. they are not defined, or i cant find it anywhere

then if i change the dns values for testing, it ask me this to enter for the amount of hotspots
22
numbers: 0 (i have to type 0)
numbers: 1(i have to type 1)
numbers: 2
numbers: 3
numbers: 4
numbers: 5
numbers: 6

can someone please help me?

regards
chris

Re: mikrotik script generation error

Posted: 30 Jan 2020, 14:25
by HSNMSupport
Hi Chris
The script that you give is not generated by HSNM; I think it is an your custom commands where cannot provide support.
Anyway I think you had the error because you don't set any DNS inside GW's settings on HSNM

Best regards

Re: mikrotik script generation error

Posted: 30 Jan 2020, 16:46
by chris865
hi there - i assure you that script is generated by the HSNM - nothing edited at all, no extra scripts added, pure "generate Walled Garden" script from the GW.

also i attach a picture of the GW's DNS

Re: mikrotik script generation error

Posted: 31 Jan 2020, 08:51
by HSNMSupport
Hi Chris
Please send to HSNM support mail address, the URL to reach your HSNM and the GW name where you have the issue.
If you have virtual GW, are you sure to have set the DNS on all of them?

Thanks

Best regards

Re: mikrotik script generation error

Posted: 31 Jan 2020, 14:09
by chris865
hi there

i have sent the email to support early in the morning

hope you received it

regards
chris

Re: mikrotik script generation error

Posted: 31 Jan 2020, 14:26
by HSNMSupport
Hi Chris
I've just logged in into your HSNM and download the GW's configuration file but I can't find any rows with " set allow-remote-requests=no cache-max-ttl=1w cache-size=2048KiB servers=DNS1,DNS2".

I also tried to import on a Mikrotik GW and I haven't any issue.

Best regards