Как выключить state в PF при редиректе портов UDP? no state не работает с правилами rdr/rdr-to. Требуется перебрасывать входящий широковещательный UDP траффик с привилегированного порта (<1024) на непривилегированный, при этом на некоторые широковещательные пакеты требуется отправлять ответы. Из-за state-ов в ответах оказывается не IP адрес интерфейса, с которого отправляется ответ, а широковещательный IP-адрес интерфейса (поскольку state был создан по пришедшему пакету на широковещательный адрес).
ОС OpenBSD 4.2 и 5.2.
Что посоветуете?
Как отключить state в PF для редиректа портов?
Модератор: arachnid
- Stauffenberg
- Сообщения: 2042
- Статус: ☮ PEACE ☮
- ОС: открытая и свободная
Re: Как отключить state в PF для редиректа портов?
Вроди бы не no state, а set state-policy
http://openbsd.org/faq/pf/ru/filter.html#udpstate
http://openbsd.org/faq/pf/ru/filter.html#udpstate
Labor omnia vincit
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” (Brian Kernighan)
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” (Brian Kernighan)
Re: Как отключить state в PF для редиректа портов?
Stauffenberg писал(а): ↑22.01.2013 13:44Вроди бы не no state, а set state-policy
http://openbsd.org/faq/pf/ru/filter.html#udpstate
Поигрался set state-policy - не помогло. Сделал костыль - разрешил непривилегированным пользователям слушать некоторые привилегированные порты.
Re: Как отключить state в PF для редиректа портов?
Код: Выделить всё
ICMP and UDP are handled in a fashion similar to TCP, but with a
much more limited set of states:
udp.first
The state after the first packet.
udp.multiple
The state if both hosts have sent packets.
udp.single
The state if the source host sends more than one packet
but the destination host has never sent one back.