Jump to content

Question

Posted

Доброго дня. Не могу понять как правильно отправлять запросы в api с post-методом.
Хочу добавить проброс портов. 
Отравляю на /rci/ip/static запрос с таким телом
 

{
    "interface": "PPPoE0",
    "protocol": "tcp",
    "port": 10340,
    "to-host": "192.168.1.2",
    "to-port": 10340
}

Возвращается 

{
    "status": [
        {
            "status": "error",
            "code": "7471107",
            "ident": "Command::Root",
            "message": "no input [http/rci]."
        }
    ]
}

Гуглил по ошибке, вообще глухо

2 answers to this question

Recommended Posts

  • 0
Posted

В аргументе to-host система ожидает MAC-адрес зарегистрированного устройства, а не IP. Из-за этого и возникает ошибка "no input [http/rci]".

Пример:

{
        "interface": "PPPoE0",
        "to-host": "aa:bb:cc:dd:ee:ff",
        "port": "56789",
        "protocol": "tcp"
}

Если вам необходимо в правиле переадресации порта указать именно IP, то необходимо использовать аргумент to-address.

Пример:

{
        "interface": "PPPoE0",
        "to-address": "192.168.1.123",
        "port": "12345",
        "protocol": "tcp"
}
  • Thanks 1

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.