Page 1 of 1

How to auto put website IP in mangle rule?

Posted: Fri May 06, 2011 2:51 am
by WirelessRudy
I want to bypass speedtests to www.speedtest.net in my mangle rules.
What I want is to have the url resolved and the resulting IP put in an address list.
This list will then be used for a mangle ´accept´ rule so it bypasses all conn. markings and is thus not queued by the configured qeue tree.

I´ve seen this script http://wiki.mikrotik.com/wiki/Manual:Sc ... _host-name
but as a complete no-know in scripting I can't even manage to convert this script in ros5.2 such all it does is to put the found IP that is stored in the cache to be put in the dst-address list.

Can anybody give me some help?

Re: How to auto put website IP in mangle rule?

Posted: Fri May 06, 2011 3:21 am
by WirelessRudy
hmm, even more complicated. The speedtest everytime can open a connection for the test to different servers.
I can find some server usually used from ny network manually and put them manually in a dst adress list but how can this be done automatically?

Since ros cannot run a test, I am thinking of the following setup:

1. resolve name www.speedtest.net and put IP in the dst-address-list
2. mangle rule mark connection going to this dst-address-list IP
3. mangle rule marks related connections and give new conn mark (or package mark)
4. this last connection (or marked packages) are now ´accepted´ and thus leave the mangle
5. these rules to be put before any other mangle rules that are used for QoS setup.

The aim is that when user runs this bandwith test the test always gets full allowed speed with highest priority. (Speed for users is in different router limited by simple queu).
This gives the most reliable test from users PC to the internet over my network while it is not ´mangled´ by QoS system.

Maybe further upgrade to a possible script or setup is that tests are limited to only "x" per hour or so to prevent users start hammering the AP network too much with too many tests.
After "x" times speedtest is also mangled and processed by QoS

Re: How to auto put website IP in mangle rule?

Posted: Fri May 06, 2011 6:35 pm
by gregsowell
I wrote an article on doing a fake speedtest site here http://gregsowell.com/?p=2253. What it does is match a layer 7 regex based on speed test sites, then adds their IP addresses to an address-list. This should do the trick, though it does miss the very first occurance.

Re: How to auto put website IP in mangle rule?

Posted: Tue Aug 27, 2013 12:29 am
by itmtech
hmm, even more complicated. The speedtest everytime can open a connection for the test to different servers.
I can find some server usually used from ny network manually and put them manually in a dst adress list but how can this be done automatically?

Since ros cannot run a test, I am thinking of the following setup:

1. resolve name http://www.speedtest.net and put IP in the dst-address-list
2. mangle rule mark connection going to this dst-address-list IP
3. mangle rule marks related connections and give new conn mark (or package mark)
4. this last connection (or marked packages) are now ´accepted´ and thus leave the mangle
5. these rules to be put before any other mangle rules that are used for QoS setup.

The aim is that when user runs this bandwith test the test always gets full allowed speed with highest priority. (Speed for users is in different router limited by simple queu).
This gives the most reliable test from users PC to the internet over my network while it is not ´mangled´ by QoS system.

Maybe further upgrade to a possible script or setup is that tests are limited to only "x" per hour or so to prevent users start hammering the AP network too much with too many tests.
After "x" times speedtest is also mangled and processed by QoS
WirelessRudy can we have step by step guide please?

Re: How to auto put website IP in mangle rule?

Posted: Thu Jan 30, 2014 3:45 pm
by lsettembri
Hi, I appreciate this is old, but I'm under the same circumstances. Can anyone post a guide please??

Thanks!