Community discussions

MikroTik App
 
TheCondor
just joined
Topic Author
Posts: 18
Joined: Sun Jul 26, 2015 4:00 pm

CURL command for disable a nat rule

Sun Mar 10, 2024 5:47 pm

I need a dry CURL command for enable (and later for disable) on the fly a nat rule preconfigured.
Its need for open port 80 just for the necessary time for finalize a letsencrypt renew challenge and disable just after.
Can someone help me? Thanks in advance for your kind support.
 
elico
Member Candidate
Member Candidate
Posts: 147
Joined: Mon Nov 07, 2016 3:23 am

Re: CURL command for disable a nat rule

Fri Mar 15, 2024 10:31 pm

You can create a Jump rule into a specific set of dst-nat rules from the dstname ruleset.
You will need to find it first so a commend might be a good way to find the jump rule.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3606
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: CURL command for disable a nat rule

Fri Mar 15, 2024 10:34 pm

The issue is from `curl`, it needs to find the item. That requires using .query syntax in the REST API, see here for some examples: viewtopic.php?t=204028&hilit=query

Who is online

Users browsing this forum: No registered users and 2 guests