0

Good morning,

I am currently attempting to connect to my MikroTik device using the Napalm python library. I have had no problem to do so in previous times using the device's API port (8728 by default).

The commands in charge of establishing a new connection are the following (which work exactly as expected):

# Connect:
    device = driver(
        hostname="DEVICE_IP",
        username="DEVICE_USERNAME",
        password="DEVICE_PWD",
        optional_args={"port": 8728},
    )

    print("Opening ...")
    device.open()

The issue here is that I would like to connect to the MikroTik device using the API-SSL port (8729 by default) instead of the plain API. Another aspect that I would like to mention is that I have generated a self-signed certificate in the MikroTik device, and attached that certificate to the IP service (API-SSL).

I have attempted to change the port to 8729 in the command above, but that does not seem to work. No error shows up, but the connection cannot be established (time_out). I was therefore wondering if there is a napalm option to 'ignore the certificate' and just proceed to do the connection. Is there a SSL option for that? If I remove the certificate from the MikroTik device, it still doesn't work.

Thanks for all your help

The Napalm library should connect to the MikroTik device using the the API-SSL port.

0 Answers0