Questions tagged [router-os]

RouterOS is an operating system for routers developed by Mikrotik.

RouterOS is an operating system for routers developed by Mikrotik.

Documentation

An extensive documentation can be found here.

55 questions
0
votes
0 answers

ansible community.routeros.api_modify module

On routerOS hardware using ansible community.routeros.api_modify module. Within the playbook I can add data to the ip firewall address-list directory. name: ip address list (NOT READY) hosts: all gather_facts: false ignore_errors: True vars:…
0
votes
1 answer

Regular expression to get topics from MikroTik logs

I have logs which looks like this: system,info,account user admin logged out from 192.168.1.9 via local system,info log rule added by admin Every line begins with comma-separated list of topics and after first space list ends. There can be one,…
0
votes
0 answers

How can I change NordVPN NAT rule order on Mikrotik with a script?

In a Mikrotik RB750Gr3 I have the NordVpn VPN serving a segment of my internal network. To access the other segments of my internal network, I defined NAT rules in the Firewall. The problem is that the VPN randomly restarts and its NAT rule goes to…
0
votes
0 answers

Delete interface port bridge, RouterOS API PHP

i want to remove interface port bridge from php api $api = new RouterosAPI(); if ($api->connect($iprouter, $username, $password)) { $api->comm('/interface/bridge/port/set', array( 'interface' => 'Wlan1', 'disabled' =>…
ohmyv33nus
  • 21
  • 2
0
votes
1 answer

Fetch using mtlogin not working on RouterOs 7.1.5

I am currently encountering a problem. When I want to download a file on a mikrotik in 6.48.6 using mtlogin and fetch tool, it works perfectly and the script waits until the router has finished downloading to send a "quit". However, when trying the…
0
votes
0 answers

Routeros connection failed

I have installed routeros in the pip but yet the error is being shown. got this code from my senior. I am trying to gather the status of the connection in my network. import routeros_api import json import datetime import sys #make a connection to…
0
votes
0 answers

Unable to establish socket session, No route to host On RouterOS

I am trying to communicate with a Mikrotik Router OS Via PHP as below private function openSocket(): void { $options = ['ssl' => $this->config('ssl_options')]; $context = stream_context_create($options); $proto =…
ololo
  • 1,326
  • 2
  • 14
  • 47
0
votes
1 answer

Mikrotik Profile Activation Failing With No Such Command Error in PHP

So, I have the following function to activate a Profile for a registered user using the RouterOS php library public function activateProfile($username) { $activationQuery = new Query( …
ololo
  • 1,326
  • 2
  • 14
  • 47
0
votes
1 answer

What next to do after mikrotik sends an ret during user creation

I am trying to communicate with a Mikrotik RouterOS to create a new user as follows $usermanagerQuery = new Query( "/tool/user-manager/user/add", [ '=customer=admin', '=username=sampleuser', …
ololo
  • 1,326
  • 2
  • 14
  • 47
0
votes
1 answer

How to pause between two asynchronous actions?

I need to make pause between "/system/backup/save" and "/file/print". Because otherwise, the backup will not be completed before the contents of the "/file" directory are displayed. Now the code is performing a backup, but it gives me a list of…
sdvjke
  • 55
  • 6
0
votes
1 answer

How connect to multiple mikrotik at the same time?

I can't figure out how to create more than one api connection to microtics (I have more than 20 of them) using routeros-client at the same time. Is it possible to somehow connect a config with parameters and credentials? I will be glad to any advice…
sdvjke
  • 55
  • 6
0
votes
1 answer

Mikrotik - result of script job as var is empty

I need to now some info about LTE/3G connection from output of command with Zabbix. Routerboard is 6.47.7 version. [admin@Mikrotik_24] > interface lte info lte1 once pin-status: ok registration-status: registered …
BigAlambic
  • 13
  • 5
0
votes
2 answers

Why am I getting an authentication error when sending an email mikrotik?

I set up sending emails from Mikrotik to gmail using TLS / SSL according to the official instructions. And then I enter the parameters for sending, I use my mail account gmail and send a test letter to my own account. As a result, I get an error in…
offline
  • 25
  • 1
  • 8
0
votes
1 answer

forward vpn network to another interface

I have an RB750 with the follow setup: - Interface 1 = WAN static IP - Interface 2 = Static IP from a LAN network (LAN provided by another FW) - MK as a IPSec/L2TP working well providing to clients the subnet x.x.x.x I would like to redirect all…
marloncos
  • 71
  • 5
0
votes
1 answer

Change source IP to destination network MikroTiK

I need to create a Nat rule that if I request a network IP on a private network of 172.21.0.0 that my source IP becomes 172.21.2.33 So if dst = 172.21.x.x then src = 172.21.2.33 The router has a public IP and a private IP on port Etha0 I have this…