Page 1 of 1

Netwatch with some modification required

Posted: Fri Dec 19, 2008 1:26 pm
by pokeman
Hi There
i need script to change interface ip if the destination ping timeout we have 4 public ip e.g 10.0.0.2, 10.0.0.3, 10.0.0.4 and single gateway 10.0.0.1 According to check every ip one by one

:local i 0; {:do {:set i ($i + 1)} while (($i < 5) && ([/ping 72.14.207.104 interval=3 count=1]=1)};
:if ($i=5 && [ /ip address set 2 address=10.0.0.2]= ([/ping 72.14.207.104 interval=3 count=1]=1)false) ($i + 1)} while (($i < 5) && ([/ping 72.14.207.104 interval=3 count=1]=1)};
:if ($i=5 && [ /ip address set 2 address=10.0.0.3]([/ping 72.14.207.104 interval=3 count=1]=1)=false) ($i + 1)} while (($i < 5) && ([/ping 72.14.207.104 interval=3 count=1]=1)};
:if ($i=5 && [ /ip address set 2 address=10.0.0.4]([/ping 72.14.207.104 interval=3 count=1]=1)=false) }

Re: Netwatch with some modification required

Posted: Sun Dec 21, 2008 1:04 pm
by pokeman
hi there

waiting for solution
Chupaka ! normis ! scripting master !!

Re: Netwatch with some modification required

Posted: Sun Dec 21, 2008 1:24 pm
by SurferTim
Hi pokemon,
I am not ignoring you. I am just not sure what you need. There is only one gateway (10.0.0.1), correct? If it is down, I am not sure what good it would do to change your interface IP address.

Re: Netwatch with some modification required

Posted: Mon Dec 22, 2008 8:48 am
by pokeman
thanks for your response actually some of our client using DDC Mirc chat due to some issue the admin block the ip addresses. e.g host addresses irc.eunet.net now i need if the ping not answer with the following host my ip public ip change then trying to ping again. 2nd time again ping to host again not answer change with another ip. we don't need to change or disable gateway

Re: Netwatch with some modification required

Posted: Mon Dec 22, 2008 9:15 am
by SurferTim
...due to some issue the admin block the ip addresses. e.g host addresses irc.eunet.net now i need if the ping not answer with the following host my ip public ip change then trying to ping again...
So you need a script to get around an IP blocker (like I use) used by some network admin (like I am) so you can continue what he/she wants you to stop? Is that it?

Re: Netwatch with some modification required

Posted: Mon Dec 22, 2008 10:45 am
by pokeman
you are right !

Re: Netwatch with some modification required

Posted: Tue Dec 23, 2008 8:00 pm
by pokeman
SurferTim waiting for script !

Re: Netwatch with some modification required

Posted: Mon Mar 09, 2009 1:33 am
by burek
lol SurferTim :)

Re: Netwatch with some modification required

Posted: Mon Mar 16, 2009 4:27 pm
by omega-00
...due to some issue the admin block the ip addresses. e.g host addresses irc.eunet.net now i need if the ping not answer with the following host my ip public ip change then trying to ping again...
So you need a script to get around an IP blocker (like I use) used by some network admin (like I am) so you can continue what he/she wants you to stop? Is that it?
To be honest, if the admin doesn't just block the sites then all power be to whoever bypasses his system and teaches him a valuable lesson. However if the reason the admin's blocking isn't working is due to a system issue perhaps you could recommend him a suitable mikrotik router in return for him removing his block rules :-)

Re: Netwatch with some modification required

Posted: Mon Mar 16, 2009 8:34 pm
by SurferTim
Hi omega-00

I will help anyone protect themselves from a hacker, but I will NOT assist anyone in their quest to become one, as impervious as my system is to that type attack.