Skip to content

Instantly share code, notes, and snippets.

@nasirhafeez
Created January 24, 2023 07:36
Show Gist options
  • Save nasirhafeez/c8fb0a39b1fbcf395b69e98f5a16977a to your computer and use it in GitHub Desktop.
Save nasirhafeez/c8fb0a39b1fbcf395b69e98f5a16977a to your computer and use it in GitHub Desktop.
Mikrotik API RouterOS v7

Mikrotik API RouterOS v7

Prerequisites for enabling Rest API access in Mikrotik:

Allow in firewall:

/ip firewall filter add action=accept chain=input

Add local certificate:

/certificate add name=local-root-cert common-name=local-cert key-usage=key-cert-sign,crl-sign

Sign local certificate:

/certificate sign local-root-cert

Add certificate for webfig and sign it:

/certificate add name=webfig common-name=192.168.88.1
/certificate sign webfig

Enable HTTPS service:

/ip service set www-ssl certificate=webfig disabled=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment