Jump to content

Question

Posted

Добавляю статические маршруты POST запросом с телом

{
  "ip": {
    "route": {
      "network": "199.199.199.199",
      "mask": "255.255.255.255",
      "interface": "Wireguard0"
    }
  }
}

но не могу разобраться как удалять маршруты.  Такая конструкция вызывает "message": "not found: \"no/ip/route\" [http/rci]."

{
  "no": {
    "ip": {
      "route": {
        "host": "199.199.199.199"
      }
    }
  }
}

2 answers to this question

Recommended Posts

  • 0
Posted
В 22.02.2025 в 21:05, guranchik сказал:

Добавляю статические маршруты POST запросом с телом

{
  "ip": {
    "route": {
      "network": "199.199.199.199",
      "mask": "255.255.255.255",
      "interface": "Wireguard0"
    }
  }
}

но не могу разобраться как удалять маршруты.  Такая конструкция вызывает "message": "not found: \"no/ip/route\" [http/rci]."

{
  "no": {
    "ip": {
      "route": {
        "host": "199.199.199.199"
      }
    }
  }
}

Возьмите тот запрос, которым создавали маршрут, и допишите "no": true внутрь объекта с IP/маской/интерфейсом:

{
    "ip": {
        "route": {
            "no": true,
            "network": "199.199.199.199",
            "mask": "255.255.255.255",
            "interface": "Wireguard0"
        }
    }
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies. By clicking "I accept" or continuing to browse the site, you authorize their use in accordance with the Privacy Policy.