А в чем разница между
и# Разрешаем трафик по local интерфейсу
${fwcmd} add pass all from any to any via lo0
#Разрешаем все по интерфейсу обратной петли
${fwcmd} add allow ip from any to any via lo
и# Разрешаем трафик по local интерфейсу
${fwcmd} add pass all from any to any via lo0
#Разрешаем все по интерфейсу обратной петли
${fwcmd} add allow ip from any to any via lo
Естественно пока непонимаю, потому что только учусь , вот я и пытаюсь понять как он работает, прочел эту статью http://www.lissyara.su/?id=1536 вроде немного просветлился, но пока еще до конца не могу сообразить как правила составляются...paradox_ писал(а):pass/allow разници никакой
нат этот тот же фаервол
я бы сказал особенность работы фаервола)
у вас фаервол и нат методом ТЫКА
вы пишите его разбираясь как отрабатывает правила
дай бой дебаг в ipfw нормальный
все ясно как божий день
а не вставили
и оно как то заработало и незаработало
вывод один - вы непонимаете как работает фаервол
соответсвенно сдесь поможет токо man ipfw
Код: Выделить всё
http://www.opennet.ru/man.shtml?category=8&russian=0
жалко только что их на русском нет от перво источника...zingel писал(а):лучше мана - ничего нет, не придумали пока
paradox писал(а):там на инглицком токо три слова в манах
в разных комбинациях
))
Код: Выделить всё
DESCRIPTION
The ipfw utility is the user interface for controlling the ipfw(4) fire-
wall and the dummynet(4) traffic shaper in FreeBSD.
An ipfw configuration, or ruleset, is made of a list of rules numbered
from 1 to 65535. Packets are passed to ipfw from a number of different
places in the protocol stack (depending on the source and destination of
the packet, it is possible that ipfw is invoked multiple times on the
same packet). The packet passed to the firewall is compared against each
of the rules in the firewall ruleset. When a match is found, the action
corresponding to the matching rule is performed.
Depending on the action and certain system settings, packets can be rein-
jected into the firewall at some rule after the matching one for further
processing.
An ipfw ruleset always includes a default rule (numbered 65535) which
cannot be modified or deleted, and matches all packets. The action asso-
ciated with the default rule can be either deny or allow depending on how
the kernel is configured.
If the ruleset includes one or more rules with the keep-state or limit
option, then ipfw assumes a stateful behaviour, i.e., upon a match it
will create dynamic rules matching the exact parameters (addresses and
ports) of the matching packet.
These dynamic rules, which have a limited lifetime, are checked at the
first occurrence of a check-state, keep-state or limit rule, and are typ-
ically used to open the firewall on-demand to legitimate traffic only.
See the STATEFUL FIREWALL and EXAMPLES Sections below for more informa-
tion on the stateful behaviour of ipfw.
All rules (including dynamic ones) have a few associated counters: a
packet count, a byte count, a log count and a timestamp indicating the
time of the last match. Counters can be displayed or reset with ipfw
commands.
Rules can be added with the add command; deleted individually or in
groups with the delete command, and globally (except those in set 31)
with the flush command; displayed, optionally with the content of the
counters, using the show and list commands. Finally, counters can be
reset with the zero and resetlog commands.
нет уж,это пока не потяну,лучше буду маны переводить глядишь еще и аглицкий выучу )))paradox писал(а):тогда учи программирование
в коде легче разобраться
эт точно ,а вообще вот за то время сколько никсами увлекаюсь,все больше и больше понимаю что без программирования не куда...paradox писал(а):как по мне так одинаково
программирование даже легче
если логика в голове есть
англицкий он сложнее в нем логики нет)))
Попробовал поставить,че то не густо там русских слов ...zingel писал(а):http://www.lissyara.su/?id=1313
Код: Выделить всё
добзащ 1 доб пропуск от всех для всех через сетьайпи 1.1.1.1
в гугле есть достатточно на эту тему по русскиSun писал(а):Попробовал поставить,че то не густо там русских слов ...zingel писал(а):http://www.lissyara.su/?id=1313
Кто может объяснить как писать правила в ipfw??? Че то ни как не могу понять ...
Код: Выделить всё
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
Line 4: bad command `ipfw="/sbin/ipfw"'
Firewall rules loaded.
net.inet.ip.fw.enable: 1 -> 1
Код: Выделить всё
`ipfw="/sbin/ipfw"'
Код: Выделить всё
ipfw="/sbin/ipfw"
Код: Выделить всё
firewall_type="/etc/myconf.firewall"
Код: Выделить всё
firewall_script="/etc/myconf.firewall"
Код: Выделить всё
firewall_type="open"