Jump to content

Question

Posted (edited)

Есть отключенное правило

ip static tcp ISP 13245 192.168.1.2 1234 !rulename
ip static disable !rulename

Как его включить-то?

(config)> ip static no disable !rulename
Network::StaticNat: Static NAT disable unchanged.

Перегруз команд фаервола/nat начинает напрягать :\

Edited by KorDen

3 answers to this question

Recommended Posts

  • 1
Posted
В 4/16/2017 в 00:13, KorDen сказал:

А куда индекс вставлять?

Да уж, не совсем очевидный синтаксис. Пришлось так сделать, чтобы обеспечить безопасный даунгрейд на версии без поддержки disable/schedule. Форма ip static disable, как в конфиге, применяется к последнему добавленному правилу.

Если нужно отключить правило из середины, используется вариант ip static rule X disable:

(config)> ip static rule 

 Usage template:  
             rule {index} (disable | (schedule {schedule}))

Нумерация с нуля.

  • 0
Posted
3 часа назад, ndm сказал:

Попробуйте индекс нужного правила задать, их ведь несколько?

А куда индекс вставлять?

Вот есть например:

ip static tcp ISP 123 192.168.1.2 !ruleA-123
ip static tcp ISP 456 192.168.1.2 !ruleA-456
ip static udp ISP 789 192.168.1.2 !ruleB-u
ip static tcp ISP 789 192.168.1.2 !ruleB-t
ip static tcp ISP 1111 through 1122 192.168.1.2 !ruleC-t
ip static udp ISP 1111 through 1122 192.168.1.2 !ruleC-u
ip static Home ISP
ip static Guest ISP
ip static tcp ISP 1234 192.168.1.2 4567 !ruleD
ip static disable !ruleD
ip static tcp ISP 12345 192.168.1.2 !ruleE-t
ip static udp ISP 12345 192.168.1.2 !ruleE-u

Мне надо на время включить ruleD и потом его обратно выключить. ip static disable я так понимаю вне зависимости от последующего параметра вырубает последнее правило. Если указывать индекс, то какой?

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.