taloot
July 20, 2006, 12:14am
1
hi guys this is my first time doing scripting i m totally new on it
my pptp connection hanging every 3-5 hours
i have to disconnect then reconnect the then it works
from 1 year i m keep doing those clicks dayily
is there a automized script could fix this??
1st pinging the main pptp gateway (server ip which is static) if fail do disconnect and reconnect pptp-conection
please guys i need to travel in vication
Use netwatch,
script is very simple ‘interface pptp-client disable/enable pppt-out1’.
taloot
July 20, 2006, 5:00pm
3
good but sometimes even if i reconnect doesnt work so the netwatch will still down status
i want the script to keep trying untill the status become up
is there break command in the scripting
Put something like this in a script (named something like pptp-reset):
:local PPTP-INT [/int pptp-client find name=XXXX]
:while true do={
/int pptp-client disable $PPTP-INT
/int pptp-client enable $PPTP-INT
:delay 10
}
Then in netwatch, do something like this:
On Down:
/system script run pptp-reset
On Up:
:local JOB [/system script job find script=pptp-reset]
/system script job remove $JOB
–Eric
taloot
July 23, 2006, 1:59am
6
ok this time it will be hard script
here its my problem
i have pptp with dynamic ip
and i want to make a dmz host for the mail server
the problem that mikrotik seems doesnt support DMZ with dynamic ip i have to inter the ip manully
i want a script the on UP (using netrwatch)
i want to to change the dstnat ip to the pptp connection ip
is it possable??
Why not just leave the (match) address out of the dst-nat rule?
Match on incoming interface, protocol, and port; and you should be good to go.
–Eric