Hello.
May be my question was already asked here, but I could not find anything…
Short question: does anybody know how to automatically add/remove firewall rules on mikrotik from remote host? (Fex expect script.)
Longer story: I need to manage mikrotik router from remote server to allow or deny users to go online. I could not find how to set up policy on forward chain in mikrotik 2.9, but my idea to “emulate” policy is simple. Just create two rules. 1. send all trafic from forward chain to some other chain where I’m going to add allow rules and 2. is to drop everything. BTW. Does there exsist default forward chain policy in mikrotik
Well now I need to add rules. It’s quite simple with expect. But how do I remove rules? Should I parse output to find rule number? I thougt find will help me, but actually I receive empty rule list with it:
[admin@MikroTik] > /ip firewall filter add chain=my_forward src-address=192.168.1.4 action=accept
[admin@MikroTik] > /ip firewall filter find src-address=192.168.1.4
[admin@MikroTik] >
How can I find rule number from IP? Are there any expect hackers here??? ![]()
TAI,
Peter.