Community discussions

MikroTik App

Search found 17 matches

by Baktery
Tue Jun 16, 2020 11:01 am
Forum: Scripting
Topic: tik4net + Xamarin
Replies: 0
Views: 384

tik4net + Xamarin

Hello!

Does anyone know tik4net supports project management Xamarin? Need functionality implemented on api for mobile Android/IOS.
by Baktery
Fri Jun 12, 2020 1:39 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

Thanks to everyone, I figured it out
by Baktery
Fri Jun 12, 2020 10:51 am
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

Is it possible with API to know if the rule is disabled or enabled? ..his condition
by Baktery
Wed Jun 10, 2020 9:05 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

I found how to disable all established connections, but what other syntax do I need to disable only those in dst-nat ipAddress:port var list = connection.CreateCommandAndParameters("/ip/firewall/connection/print", TikCommandParameterFormat.NameValue,".proplist", ".id").ExecuteList(); foreach (var it...
by Baktery
Wed Jun 10, 2020 7:39 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

really no one came across in order to disable all the connections knowing the dst-address?
by Baktery
Tue Jun 09, 2020 11:24 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

I was able to delete the established connection. But there is a problem when there are more than one connection, I get an error at the stage: var id = connect.Single().GetId(); The error sounds like this: System.InvalidOperationException: "The sequence contains more than one element". Please tell me...
by Baktery
Tue Jun 09, 2020 7:55 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

I noticed that id changes if, re-create the rule in nat. But still, it is assigned to a variable.
by Baktery
Tue Jun 09, 2020 5:37 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

I already figured out the id and disabled the rule, thanks !. Please tell me how can I delete all existing connections with the specified dst port?
by Baktery
Mon Jun 08, 2020 8:39 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

is there an example of this method?
by Baktery
Mon Jun 08, 2020 6:53 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

I still managed to turn the rule on and off. But this works with the GetId () property; TikSpecialProperties.Id, that is, using the identifier that is assigned to the NAT rule. How to make a rule disconnect using a comment on this rule? Do TikSpecialProperties have this property? Using id is not con...
by Baktery
Mon Jun 08, 2020 6:16 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

Can anyone help me with this issue?
by Baktery
Mon Jun 08, 2020 11:34 am
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

I need to do this on a computer, and on a mobile. So that a person can turn off access in a few clicks anywhere where there is Internet without going into Winbox.
by Baktery
Sun Jun 07, 2020 11:58 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

>Also what button? Physical on the router or in a program on a computer?
this is a soft button on the computer, which with one click will disable the rule on the router in NAT
by Baktery
Sun Jun 07, 2020 11:21 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Re: Enable, disable the rule in NAT using the button

>Why would you like to change the NAT rule? I want to enable and disable from an application on a computer or phone I try this way: ITikCommand cmd = connection.CreateCommandAndParameters("/ip/firewall/nat/set find[comment=" + nameRule + "] disable=yes"); cmd.ExecuteNonQuery(); But I get an error: "...
by Baktery
Sun Jun 07, 2020 8:17 pm
Forum: Scripting
Topic: Enable, disable the rule in NAT using the button
Replies: 20
Views: 2674

Enable, disable the rule in NAT using the button

Hello, I want to disable and enable the rule in Ip>Firewall>NAT, knowing the comment rule. I use a API in C#, and tik4net Here is part of my code: private void button1_Click(object sender, EventArgs e) { using (ITikConnection connection = ConnectionFactory.CreateConnection(TikConnectionType.Api)) { ...
by Baktery
Fri May 29, 2020 11:59 am
Forum: General
Topic: API for C#
Replies: 3
Views: 625

Re: API for C#

The examples below apply to the method with ssl ?
by Baktery
Thu May 28, 2020 8:59 pm
Forum: General
Topic: API for C#
Replies: 3
Views: 625

API for C#

Hello, I want to use API for C#. I use this documentation here https://wiki.mikrotik.com/wiki/API_in_C_Sharp When I try to connect, I get an error on Mikrotik: login failure for user api user from via api mikrotik. Version RouterOS 6.46.6 I heard that the authentication method has changed due to the...