openwrt, использующий iptables с тройником, кажется сломанным

910
SnakeByte

Я пытался настроить зеркалирование портов в openwrt версии 14.07, следуя этому руководству :

однако команда:

$iptables -t mangle -A POSTROUTING -o br-lan ! -s 192.168.0.0/16 -j TEE --gateway 192.168.1.254 

выдает следующую ошибку:

$ iptables: нет цепочки / цели / совпадения с этим именем.

У кого-нибудь есть идеи, как это решить?

Спасибо

1

1 ответ на вопрос

1
MariusMatutiae

To me the above command seems perfectly fine, except for the position of the NOT (=!) operator:

 $iptables -t mangle -A POSTROUTING -o br-lan -s ! 192.168.0.0/16 -j TEE --gateway 192.168.1.254 

EDIT:

If it still does not work, that's because you are missing some of the iptables modules. You can find them here, it is imposisble for me to know which one you are missing, you may wish to try them out. You will surely need

 insmod ipt_route 

for the above iptables command to work, plus, like I said, perhaps more.

Should this all fail, this Googl Code page presents an easy alternative to doing it with iptables.

набрав как ваш, я получаю: '$ Bad аргумент `192.168.0.0/16' ' SnakeByte 8 лет назад 0
@ SnakeByte Пожалуйста, смотрите мои изменения. MariusMatutiae 8 лет назад 0
к сожалению, даже дошел до установки пакетов iptables. все еще не может запустить 'code' insmod ipt_route: $ Не удалось найти ipt_route. Может быть, это встроенный модуль? SnakeByte 8 лет назад 0
Я попытался запустить зеркалирование портов, прежде чем прийти сюда, но это не очень успешно: $ port-mirroring: не удается загрузить библиотеку 'libpcap.so.1.1', хотя libpcap установлен правильно SnakeByte 8 лет назад 0

Похожие вопросы