VPN and remote access

How to connect remote networks to Ravicor with WireGuard tunnels (manually or with AI-assisted automatic setup), manage MikroTiks through WinBox right in the browser, and use the web terminal built into the panel.

WireGuard New in 7.2 Master only

Ravicor runs on a Linux server and monitors the provider's local network. When there are POPs, cities, or remote networks behind an edge MikroTik or a Debian server, WireGuard creates an encrypted VPN tunnel between the Ravi server and that remote end. The subnets declared as routes become reachable through the tunnel, and their equipment can be registered and monitored by ping, SNMP, and SSH as if it were on the local network.

Version 7.2 brings the redesigned manager: cards with live status, client or server mode, multiple peers with individual routes, a pre-shared key kept encrypted, and a three-layer shield against route and DNS hijacking. The WireGuard packages are installed automatically by the system update: the operator does not need to install anything on the server.

Where it is

  1. In the menu, open Settings and go to the Network tab.
  2. Find the WireGuard VPN Manager card. If no VPN exists yet, the card shows the WireGuard VPN showcase with the Access WireGuard Manager button, which opens the manager.
  3. With the manager open and no VPNs registered, the empty state No VPN configured appears with the Set up first VPN button. The top bar also has the Add VPN button.

All WireGuard actions (create, edit, delete, connect, disconnect, and the AI setup) require a Master-level account. Accounts without that level are denied access.

Concepts you will find on the screen

ConceptWhat it means
Client modeThis Ravi connects to a remote server: Ravi dials an endpoint (the public IP and port of the remote equipment). This is the most common mode.
Server modeThis Ravi receives connections: Ravi listens on a UDP port and the remote ends dial into it. Requires a valid listen port.
Tunnel IP (Address)Private IP that Ravi will have inside the VPN, in CIDR (e.g. 10.0.0.2/24). It is not the public IP. It can be left blank for the AI to choose during automatic setup.
PeerThe other side of the VPN: a remote server, a MikroTik, or a client. A VPN can have several peers, each with its own routes.
Route (CIDR)Subnet on the other side that you want to reach and monitor through the tunnel. It is the route that defines what traffic goes through the tunnel.
PSKOptional pre-shared key, an extra layer of encryption. It is stored encrypted on the server.
KeepaliveInterval in seconds (default 25) that keeps the tunnel alive when the remote end is behind NAT.
InterfaceEach VPN becomes a wg<id> interface on the server (e.g. the VPN with ID 3 uses the wg3 interface).

Shield against route and DNS hijacking

The biggest risk of a misconfigured VPN on a monitoring server is a full route (0.0.0.0/0 or ::/0) entering the tunnel: this would hijack the server's default route and DNS, taking down local monitoring and the embedded DNS. The 7.2 manager prevents this scenario across three independent layers: the /0 route is rejected at save time, the generated configuration never contains a full route or a DNS directive, and the applier service revalidates everything and installs only per-destination routes, in a dedicated table, without touching the server's default route.

  • When trying to save a full route, the system rejects it with the message that a full route (/0) is not allowed for monitoring security. List only the real blocks you need to monitor.
  • Listen port 53 is forbidden in server mode, to protect the embedded DNS.
  • If a VPN migrated from a previous version had a full route, the route is removed during migration and the card turns yellow with the notice: This VPN had a full route (0.0.0.0/0) that was removed for security. Review the routes before connecting.

The card for each VPN

Each VPN appears as a card with the name, a mode badge (Client or Server), and a status badge: Connected (green) or Disconnected (gray). The status is honest: Connected means an active interface with a handshake in the last 180 seconds. An interface that is up with the other side dead counts as disconnected.

Beyond the badges, the card gathers four blocks:

  • Interface data: the Interface (e.g. wg1), the Tunnel IP, the Port, and, when connected, the Traffic with RX and TX summed across all peers.
  • Peers & Routes section: each peer displays the endpoint (or the start of the public key), the Edit peer and Delete peer icons, the routes as removable chips, and the green + route chip to add new ones.
  • Action buttons: Connect or Disconnect, View config, Edit, Configure with AI, and Delete.
  • Border color: green when the VPN is connected; yellow when the shield removed a route during migration.

Create a VPN manually

The fields of the Add VPN modal (when editing, the title changes to Edit VPN):

FieldWhat to fill in
Operation modeSelectable Client or Server cards (see concepts above).
NameFriendly identification of the VPN (e.g. "North City").
Tunnel IP (Address)Optional. Ravi's private CIDR inside the tunnel; if blank, the AI setup chooses it automatically.
Listen portDefault 51820. Required in server mode; cannot be 53.
MTUDefault 1420, accepted between 1280 and 1500.
Private key (optional)If blank, the system generates it automatically. When editing, an empty field preserves the existing key.
  1. Click Add VPN. In the modal, choose the Operation mode (Client or Server) and fill in the Name (e.g. "North City").
  2. Fill in the optional Tunnel IP (Address) field with a private CIDR, or leave it blank for the AI to choose later. Adjust the Listen port (default 51820; required in server mode and never 53) and the MTU (default 1420, between 1280 and 1500) if needed.
  3. The Private key (optional) field can be left blank for the system to generate it automatically. Click Save.
  4. On the VPN card, add the peer: enter the Name (optional), the Peer public key (44-character base64 text), the Endpoint in the host:port format (required in client mode; if you omit the port, the system assumes 51820), the Pre-shared key (PSK, optional), and the Keepalive (s, optional). Click Save peer.
  5. Add the routes through the + route chip: in the Add route modal, enter the Block (CIDR) (e.g. 192.168.10.0/24) and a Description (optional), and click Add.
  6. Click Connect. The system applies the configuration and waits a few seconds for the result: success shows "Connected"; an error shows "Failed:" with the reason; if there is no response in time, the status stays as "Requested", asking you to wait and refresh the screen.

When editing a VPN, leaving the Private key (optional) field empty preserves the existing key. Pasting a new key changes Ravi's public key and breaks the pairing: you will need to update the peer on the remote end.

For the handshake to complete, the tunnel's own subnet (e.g. 10.0.0.0/24) must be among the routes. In manual setup it is easy to forget this block; in the AI setup it is included automatically.

View config: configure the remote end manually

The View config button opens a modal with three tabs ready to copy and paste onto the remote end:

  • Client Configuration: the .conf file for the Ravi side, usable with wg-quick up.
  • MikroTik Commands: the ready RouterOS command sequence.
  • Linux Configuration: the .conf along with the command to enable the service on a remote Linux.

If the system generated the server keys automatically, the modal shows a one-time notice with the Copy Server Private Key button. The private key is only shown on that occasion: copy and store it right away, because it will not be shown again.

Disconnect and delete

Disconnect asks for the confirmation "Disconnect this VPN?". Deletions also ask for confirmation: deleting the VPN removes all of its peers and routes; deleting a peer removes its routes. Creating, editing, connecting, and disconnecting VPNs generate entries in the Action history.

Behavior after restart and migration

There is no scheduled automatic reconnection: the interface is brought back up by the action in the panel (or by the automatic reapply after a version migration). After a reboot of the Ravi server, check on the card whether the VPN returned to the Connected status and reconnect from the panel if needed.

When updating from previous versions, VPNs from the old model (with a single peer) are migrated automatically to the new model, with individual peers and routes. Full routes do not migrate (the card turns yellow with the removed-route notice), and VPNs that were active and remained valid are reapplied automatically under the new shield.

Limits and best practices

  • Internal limit of 64 peers and 64 routes per VPN.
  • Use route blocks as specific as possible: the route defines what traffic goes through the tunnel and what can be monitored.
  • PSK is optional, but recommended on links over the internet.
  • On MikroTik, prefer the AI setup (automatic backup and validation at the end). Keep the session backup if you plan to change something later.

Troubleshooting

SymptomLikely cause and what to do
Badge stays Disconnected even after connectingNo handshake in the last 180 seconds. Check the endpoint (the public IP and port of the remote equipment, never Ravi's IP), that the UDP port is open in the remote firewall, and the key pairing (the public key on one side must match the private key on the other).
Handshake never completes after manual setupThe tunnel subnet must be among the routes (e.g. 10.0.0.0/24). Add the tunnel block to the peer's routes.
Full-route-not-allowed errorIntentional shield behavior. Register only the real blocks you need to monitor.
Yellow card with a removed-route noticeThe migrated VPN had a 0.0.0.0/0 route, removed for security. Review and add the correct routes before connecting.
Invalid-listen-port error in server modePort 53 is reserved for the embedded DNS. Choose another UDP port.
I edited the VPN and the tunnel stopped pairingA new private key was pasted and Ravi's public key changed. Update the peer on the remote end, or leave the field empty when editing to preserve the key.
Error indicating that WireGuard is not installedMissing package on the server. Run the system update, which installs the packages automatically.

Remote setup by AI New in 7.2 Master only

The Configure with AI button, on the VPN card, is the recommended path for those who are not proficient with WireGuard: an AI accesses the remote equipment over live SSH and does the entire configuration of the remote end (MikroTik RouterOS or a Debian server), with the operator following every command in real time. The feature requires Ravi's AI service to be available.

Step by step

  1. On the VPN card, click Configure with AI. The Configure VPN with AI modal opens, with the summary: the AI accesses the equipment and Ravi live, makes a backup (MikroTik), applies the VPN and validates it, and you follow every command.
  2. Enter the remote equipment credentials: Device type (MikroTik RouterOS or Debian Server), Device host / IP, SSH user, Port (default 22), and SSH password. The credential is stored encrypted on the server.
  3. Click Start configuration. If any data is missing, the system warns: "Provide host, user, and password.".
  4. Follow the execution in two side-by-side terminals: Ravi Server (what the AI runs on Ravi itself) and Remote device (the SSH session on the MikroTik or Debian). A status bar indicates the progress (yellow running, green completed, red error) and marks when the backup was made.
  5. Read the Reasoning: box, where the AI explains in text what it is doing at each step.
  6. If the AI needs to run a sensitive command (reset, reboot, removing an interface or user, deleting files), the alert The AI wants to run a sensitive command: appears with the exact command and the Approve and Reject buttons. Without a response within 5 minutes, the command is rejected automatically.
  7. At the end, the screen shows a summary of what was done. On success, the page reloads and the VPN appears connected. The Close button ends the follow-along.

What the AI guarantees

  • Mandatory backup before anything: on MikroTik, a binary backup plus a configuration export; on Debian, a compressed copy of the existing VPN configuration. If the backup fails, it does not proceed with any change.
  • Works in small steps and inspects what already exists before creating anything.
  • Adopts an existing tunnel: if there is already a tunnel from this Ravi on the equipment, it reuses the port and subnet and only updates the peer pairing, without recreating it or aborting over a conflict.
  • Chooses the tunnel IP when the Tunnel IP (Address) field was left blank: a conflict-free private /24 subnet, with the equipment ending in .1 and Ravi in .2.
  • Opens the UDP port in the remote firewall when necessary.
  • Applies the configuration on Ravi, connects, and validates the result with a handshake and a ping.
  • Automatically includes the tunnel subnet in the allowed routes, which avoids the classic case of a handshake that never completes.
  • If the remote end is another Ravi server, the AI registers the VPN in its manager in Server mode, without editing configuration files manually.
  • The entire session is recorded, with an event timeline and an entry in the Action history.

The setup session uses a single-use token valid for 15 minutes and runs only within the server itself, with no external exposure. If the AI reports that it cannot confirm the owner of an existing peer, that is a safeguard: it only reconfigures peers proven to belong to this Ravi. In that case, confirm the tunnel manually on the equipment.

Long sessions no longer drop, and momentary instabilities of the AI service trigger automatic new attempts, with a notice in the reasoning panel.


WinBox in the browser New in 7.2

WinBox 4, MikroTik's official client in a native Linux version, runs inside the Ravi panel, in a modal, without installing anything on the technician's machine. It is the practical way to manage MikroTiks from anywhere the panel is reachable.

Each user has their own isolated environment: the accesses and passwords saved in WinBox are kept only for that user and survive between sessions. There is no cross-access between users. The environment is never exposed by a public URL: access only happens with a valid panel session, verified on every request.

How to enable and use

  1. In the avatar menu, open Profile and find the WinBox card.
  2. Turn on the Enable WinBox switch. The card explains: it enables quick access to your MikroTiks right from the panel, in a button at the top, with the saved accesses and passwords kept only for you.
  3. With the option on, a round button with the MikroTik logo appears at the top of the panel, next to the theme switcher.
  4. Click the button to open the WinBox modal, which takes up most of the window. A preloader appears while the environment starts. Close it with the close button or the ESC key.
  5. Inside the modal it is the real WinBox: add routers, save accesses, and open sessions normally. Copy and paste work, and the light or dark theme follows the panel's current theme.

First use

The feature's requirements are installed automatically by the system update. The environment image (about 2.4 GB) is prepared in the background right after the update, so that the first click is instant. This preparation requires outbound internet on the server, since WinBox is downloaded from MikroTik's site (the binary is not distributed alongside, due to licensing). If the image does not yet exist on the first click, the system builds it on the spot and the first use may take a few minutes.

If you need to follow this initial preparation, the progress is recorded on the server in /var/log/winbox-build.log. An internal lock prevents simultaneous preparations.

Automatic behavior

  • Environments idle for more than 10 minutes (modal closed) are shut down automatically to free memory. The data persists: when you reopen the modal, the environment starts again in seconds with the saved accesses intact.
  • If the environment comes back from a reboot in a bad state, the system recreates it on its own while preserving the data: saved passwords and addresses are not lost.

The accesses saved in WinBox are stored on the Ravi server, in the user's space. Treat the server as a sensitive asset. On servers with little memory, avoid leaving many WinBox modals open at the same time.

Troubleshooting

SymptomCause and action
WinBox button does not appear at the topThe Enable WinBox option is off in that user's Profile.
Slow preloader on the first openThe image is still being prepared (first use without the background preparation completed). Check that the server has outbound internet and wait a few minutes.
Black or frozen screen when reopening after a whileThe idle environment was shut down; the system detects it and reloads on its own when you reopen the modal. If it persists, close and open the modal again.
Access-denied error from an invalid sessionThe panel session expired. Log in again.
WinBox opened in the wrong themeThe theme syncs when the modal opens. After switching the panel theme, close and reopen the modal.

Web terminal New in 7.2

The web terminal is a panel that slides over the screen with a real shell, right in the browser. It was redesigned in 7.2 with a faster engine (a real-time connection, instead of the old periodic-refresh mechanism) and with a single-use token on every open. The migration from the old terminal to the new one happens automatically during the system update.

Use the terminal for quick diagnostics without leaving the panel: check a service, test connectivity from the server, or access equipment over SSH.

It has two uses:

  • Ravi server terminal: the Terminal item in the top menu (on desktop it appears as <_; in the mobile menu, as "Terminal"). Close it with the Close button.
  • SSH terminal of a device: in the device's context menu, the SSH Terminal item opens an SSH session directly on the equipment, using the SSH credentials registered on the device (its own or inherited from the system default). See also Device SSH terminal.

Who can use it

ProfileServer terminalDevice SSH terminal
MasterRoot shell on the Ravi serverYes
AdminLimited shell (non-root user)Yes
SimpleNo (permission-denied message)No

The Terminal menu item only appears for accounts that are not Simple level and when the system has an active plan.

The Master terminal is real root on the monitoring server. Restrict who has a Master account. Terminal sessions do not go through the panel's audit history: actions taken there leave no trail in the system.

Security: single-use token

On every open, the panel generates a random token valid for that session. The terminal consumes the token immediately and it cannot be reused: pasting an old terminal URL (or a URL without a token) lands on the operating system login screen, never on an open shell. The terminal service listens only within the server itself, with no direct exposure.

Usage details

  • On phones and tablets, the terminal opens without the welcome banner (which would break the small screen) and with a smaller font.
  • The welcome banner appears only once per session: 7.2 fixed the duplication that occurred on some opens.
  • The terminal background is dark and translucent over the panel, in both the light and the dark theme.
  • In the device SSH terminal, if the option to inherit credentials from the parent is checked, the system's default user, password, and port apply.

Troubleshooting

SymptomCause and action
Terminal only shows "login:" and asks for a userMissing or expired token (reused URL), or a server still on the old terminal. The 7.2 update migrates automatically to the new terminal; running the update resolves it.
Terminal keeps "reconnecting" and does not openOutdated web proxy configuration. Regenerating the configuration through the system itself or through the update resolves it.
Device SSH terminal does not connect to the deviceWrong or missing device SSH credentials, or the inheritance of the system default is on with an outdated default. Check the credentials in the device's registration.
Simple user clicks and sees a permission noticeExpected behavior: the terminal is not available for Simple-level accounts.