I Hope I can find a solution for this script if we can update it or not !
I was working using this script since late 2005 but we found heaps of problems , like all host names are changing quitely every month , sometimes we see facebook.com changes its ip addresses every day . If somebody can update my script ..
I have about 256,000 static records in my ROS DNS .. and I cant remove them because its is really helping to improve our internet surfing .. so I have figured to change or update my script .
I want my script to be like this ..
the schedule scipt can work every 5 minutes .. it will search in the dynamic dns cache lists , if the ip was updated from the webmaster then it will use /ip dns static set ****** or the hostname was not in the static list then use / ip dns static add **** .
My current script is :
:foreach a in=[/ip dns cache find static=no] do={
/ip dns static add address=[/ip dns cache get $a address] name=[/ip dns cache get $a name]
}
I imagine that to be the most broken and inefficient way to do DNS forwarding.
However you might have good reasons, other than efficiency and correctness.
Any reason why BIND or something similar can’t be configured to do the same?
With an open-source solution you could even modify the DNS server code to do what you want.
So what I’m asking is what exact functionality are you looking for?
I am suffering from the Mikrotik WEBPROXY since i upgraded to v3.x . heaps of problems with it + dns too .. I was working fine using 2.9.x ..
by the way .. my most work depends on chains .. so address lists are being used to split users into groups since i give each customer subnet with /30 .
but what about BIND that can be installed on windows 2003 server . What benefits I can get from BIND as I wanted to add all dynamic addresses or hostnames into static and do a scipt like Mikrotik to check all dynamic cache list if the ip of the hostname was changed or not .. then if it was changed , it would update the record that its in the static list but if its not in the static list then add it as new record !.
This is really good solution for me .. cause its improving alot .
I’m not familiar with that webproxy problem but I haven’t proxied/cached web traffic since 2002.
Ok, things seem a little clearer (i think). Your webproxy performance is suffering because of slow DNS resolution. Correct?
I don’t know if you already tried this but…
Assuming you have plenty of RAM in your router. Try doing this in terminal and see if it works/helps/does nothing.
You should remove the static address mappings for the test and give it ample time to fill the cache.
/ ip dns set cache-max-ttl=24h cache-size=32768KiB max-udp-packet-size=1280 secondary-dns=0.0.0.0
You could increase max-udp-packet-size from values ranging from 512 (default in routeros 3.x) to 4096 (default for BIND 9)
You could also decrease or increase cache-size. Remember that cache-size has a trade-off. The bigger the cache, the more cpu it takes to look in it.
It is important to dns performance to not use secondary-dns because that doubles the load.
If this still doesn’t score 100% then you setup your windows 2003 server with microsoft DNS or BIND.
Point your router towards the 2003 server (and only the 2003 server).
This way 2003 server will gather the necessary information independently of your current DNS.
Give the DNS service ample memory.
I believe the MS DNS service or BIND is more efficient to handle this type of job than the simple micro dns forwarder found in routeros.
PowerDNS does a fantastic job of forwarding/recursive cache jobs but i don’t know if it’s supported on windows.
It would help a lot if you included more information