>>>Ну можно например так
>>>ipfw add deny tcp from any to any 25 via ETH
>>>
>>>ETH - внешний интерфейс
>>
>>Спасибо!
>>
>>Еще вопросик...
>>
>>r.conf:
>>firewall_enable="YES"
>>firewall_script="/etc/rc.firewall"
>>firewall_type="/etc/ipfw.conf"
>
> ^^^^^^^^^^^^^^^ - на скока я знаю тут
>пишется тип файрволла из доступных в rc.firewall, наприме open, client и
>т.д.
тут может быть написан и путь к файлу с правилами:
man rc.conf:
...
firewall_type
(str) Names the firewall type from the selection in /etc/rc.firewall, or the file which contains the local firewall ruleset.
...
>
>А то, что у тебя в ipfw.conf написано нужно в нужном месте
>rc.firewall писать, в зависимости от firewall_type.
>
не обязательно (а ИМХО и вообще не нужно) писать в rc.firewall. Пишешь свой набор правил , обзываешь как хочешь - тут это ipfw.conf, и в /etc/rc.conf прописываешь firewall_script="/etc/ipfw.conf". firewall_type убираешь вообще.
>А как перезапустить rc.firewall без перезагрузки фрюхи я не знаю... Можно конечно
>сделать его исполняемым и не использовать firewall_type и просто запускать его
>после внесения изменений... но как-то это не правильно... Может кто знает
>как это сделать скажите.
так и делать
sh /etc/ipfw.conf с консоли. Удаленно (как тут уже ниже написали) так лучше не делать ;) Почему - man ipfw:
...
-q
While adding, zeroing, resetlogging or flushing, be quiet about actions (implies -f). This is useful for adjusting rules by executing multiple ipfw commands in a script (e.g.,`sh /etc/rc.firewall'), or by processing a file of many ipfw rules across a remote login session. If a flush is performed in normal (verbose) mode (with the default kernel configuration), it prints a message. Because all rules are flushed, the message might not be delivered to the login session, causing the remote login session to be closed and the remainder of the ruleset to not be processed. Access to the console would then be required to recover.
...