iptables -A FORWARD -m layer7 --l7proto edonkey -j DROP
iptables -t mangle -A POSTROUTING -m layer7 --l7proto edonkey -j MARK --set-mark 3
iptables -t mangle -A PREROUTING -m layer7 --l7proto ftp -j MARK --set-mark 400
wywala cosik takiego
iptables v1.3.3: Couldn't find a pattern definition file for edonkey.
iptables v1.3.3: Couldn't find a pattern definition file for ftp.
Najwyrazniej masz ,,zle'' zainstalowany L7-filter. Nie moze on znalezc plikow *.pat, ktorych najprawdopodobniej szuka w /etc/l7-protocols/ lub /etc/l7-protocols/protocols. Mozesz uzyc opcji iptables --l7dir tak aby wskazac ich miejsce (jesli masz je w ogole).
[url=http://bdtk.sourceforge.net][img]http://pin.if.uz.zgora.pl/~beton/bdt-ready.png[/img][/url] #337142
--------------------------------------------
"I had a letter in the post today. It said 'Gas Bill'. It sounds a tempting offer." -- Alan Cox
"Users have been trained that when a computer bluescreens and losing all of their data, it's either (a) just the way things are, or (b) it's microsoft's fault." -- Theodore Tso
Troche poszukałem na googlach i poczytałem no i zainstalowałem to jeszcze raz ale tym razem po wpisaniu jakiejs regułki wywała mi tak malutki błędzik ze nie moze czegos załadowac
root@server:~# iptables -A FORWARD -m layer7 --l7proto edonkey -j DROP
iptables v1.3.3: Couldn't load match `layer7':/usr/local/lib/iptables/libipt_layer7
.so: cannot open shared object file: No such file or directory
Czy jest to bład instalacji czy nalezy cos jeszcze przekopiowac lub załadowac, ja mam layera i wszytko co potrzebne do jego działania wkompilowane na stałe w jadro.
A masz firewall ze śledzeniem stanu połaczeń ?? [...]-m state --state RELATED,ESTABLISHED [...]
Kolejność regułek firewalla też ma znaczenie. Pakiet wpada do pierwszej do jakiej pasuje i jezeli idzie o cele ACCEPT i DROP to kończy jesgo podróż przez regułki.
Ostatnio zmieniony 2006-08-25, 20:22 przez bojleros, łącznie zmieniany 1 raz.
iptables -t mangle -A POSTROUTING -m layer7 --l7proto ares -j MARK --set-mark 3
tez przechodzi bez problemy a ares dalej smiga bez zadnych ograniczen. Ma ktos jakis pomysł dlaczeogo layer7 mi nie działa, a moze w skrypcie powinny znales sie jakiego dodatkowez wpisy
kozystałem z tego opisiku
root@server:/usr/src/iptables-1.3.3# iptables -I POSTROUTING -m layer7 --l7proto ares -j DROP
iptables: No chain/target/match by that name
root@server:/usr/src/iptables-1.3.3# iptables -I PREROUTING -m layer7 --l7proto ares -j DROP
iptables: No chain/target/match by that name
root@server:/usr/src/iptables-1.3.3#