Hilfe --wieso Funktionoert Das Net?--

p.kraschinski

Well-Known Member
HILFE @all

wieso funktionieren folgende ipfw relgen und folgende ipa relgeln net ?

Code:
server21# cat /etc/ipfw.conf 

add allow ip from any to any

02300 add count ip from any to 213.203.244.230
02310 add count ip from any to 213.203.244.231
02320 add count ip from any to 213.203.244.232
02330 add count ip from any to 213.203.244.233
02340 add count ip from any to 213.203.244.234
02350 add count ip from any to 213.203.244.235
02360 add count ip from any to 213.203.244.236
02370 add count ip from any to 213.203.244.237
02380 add count ip from any to 213.203.244.238
02390 add count ip from any to 213.203.244.239
02400 add count ip from any to 213.203.244.240
02410 add count ip from any to 213.203.244.241
02430 add count ip from any to 213.203.244.242
02430 add count ip from any to 213.203.244.243
02440 add count ip from any to 213.203.244.244
02450 add count ip from any to 213.203.244.245
02460 add count ip from any to 213.203.244.246
02470 add count ip from any to 213.203.244.247
02480 add count ip from any to 213.203.244.248
02490 add count ip from any to 213.203.244.249
02500 add count ip from any to 213.203.244.250
02510 add count ip from any to 213.203.244.251
02520 add count ip from any to 213.203.244.252
02530 add count ip from any to 213.203.244.253
02540 add count ip from any to 213.203.244.254

02301 add count ip from 213.203.244.230 to any
02311 add count ip from 213.203.244.231 to any
02321 add count ip from 213.203.244.232 to any
02331 add count ip from 213.203.244.233 to any
02341 add count ip from 213.203.244.234 to any
02351 add count ip from 213.203.244.235 to any
02361 add count ip from 213.203.244.236 to any
02371 add count ip from 213.203.244.237 to any
02381 add count ip from 213.203.244.238 to any
02391 add count ip from 213.203.244.239 to any
02401 add count ip from 213.203.244.240 to any
02411 add count ip from 213.203.244.241 to any
02431 add count ip from 213.203.244.242 to any
02431 add count ip from 213.203.244.243 to any
02441 add count ip from 213.203.244.244 to any
02451 add count ip from 213.203.244.245 to any
02461 add count ip from 213.203.244.246 to any
02471 add count ip from 213.203.244.247 to any
02481 add count ip from 213.203.244.248 to any
02491 add count ip from 213.203.244.249 to any
02501 add count ip from 213.203.244.250 to any
02511 add count ip from 213.203.244.251 to any
02521 add count ip from 213.203.244.252 to any
02531 add count ip from 213.203.244.254 to any

server21#

Code:
server21# cat /usr/local/etc/ipa.conf

lobal {
maxchunk = 1G
update_db_time = 30s
db_dir = /var/ipa
lock_wait_time = 20s
}

rule acc_230 {
info = acc_230i
ipfw = 2300 2301
}

rule acc_231 { 
info = acc_231i
ipfw = 2310 2311
}

rule acc_232 {
info = acc_232i
ipfw = 2320 2321
}
rule acc_233 {
info = acc_233i
ipfw = 2330 2331
}

rule acc_234 {
info = acc_234i
ipfw = 2340 2341
}

rule acc_235 {
info = acc_235i
ipfw = 2350 2351
}

rule acc_236 {
info = acc_236i
ipfw = 2360 2361
}

rule acc_237 {
info = acc_237i
ipfw = 2370 2371
}

rule acc_238 {
info = acc_238i
ipfw = 2380 2381
}

rule acc_239 {
info = acc_239i
ipfw = 2390 2391
}

rule acc_240 {
info = acc_240i
ipfw = 2400 2401
}

rule acc_241 {
info = acc_241i
ipfw = 2410 2411
}

rule acc_242 {
info = acc_242i
ipfw = 2420 2421
}

rule acc_243 {
info = acc_243i
ipfw = 2430 2431
}

rule acc_244 {
info = acc_244i
ipfw = 2440 2441
}

rule acc_245 {
info = acc_245i
ipfw = 2450 2451
}

rule acc_246 {
info = acc_246i
ipfw = 2460 2461
}

rule acc_247 {
info = acc_247i
ipfw = 2470 2471
}

rule acc_248 {
info = acc_248i
ipfw = 2480 2481
}

rule acc_249 {
info = acc_249i
ipfw = 2490 2491
}

rule acc_250 {
info = acc_250i
ipfw = 2500 2501
}

rule acc_251 {
info = acc_251i
ipfw = 2510 2511
}

rule acc_252 {
info = acc_252i
ipfw = 2520 2521
}

rule acc_253 {
info = acc_253i
ipfw = 2530 2531
}

rule acc_254 {
info = acc_254i
ipfw = 2540 2541
}

server21#

Code:
server21# ipfw -a show
00100 517912 396264223 allow ip from any to any
00200      0         0 allow ip from any to any
02300      0         0 count ip from any to 213.203.244.230
02301      0         0 count ip from 213.203.244.230 to any
02310      0         0 count ip from any to 213.203.244.231
02311      0         0 count ip from 213.203.244.231 to any
02320      0         0 count ip from any to 213.203.244.232
02321      0         0 count ip from 213.203.244.232 to any
02330      0         0 count ip from any to 213.203.244.233
02331      0         0 count ip from 213.203.244.233 to any
02340      0         0 count ip from any to 213.203.244.234
02341      0         0 count ip from 213.203.244.234 to any
02350      0         0 count ip from any to 213.203.244.235
02351      0         0 count ip from 213.203.244.235 to any
02360      0         0 count ip from any to 213.203.244.236
02361      0         0 count ip from 213.203.244.236 to any
02370      0         0 count ip from any to 213.203.244.237
02371      0         0 count ip from 213.203.244.237 to any
02380      0         0 count ip from any to 213.203.244.238
02381      0         0 count ip from 213.203.244.238 to any
02390      0         0 count ip from any to 213.203.244.239
02391      0         0 count ip from 213.203.244.239 to any
02400      0         0 count ip from any to 213.203.244.240
02401      0         0 count ip from 213.203.244.240 to any
02410      0         0 count ip from any to 213.203.244.241
02411      0         0 count ip from 213.203.244.241 to any
02430      0         0 count ip from any to 213.203.244.242
02430      0         0 count ip from any to 213.203.244.243
02431      0         0 count ip from 213.203.244.242 to any
02431      0         0 count ip from 213.203.244.243 to any
02440      0         0 count ip from any to 213.203.244.244
02441      0         0 count ip from 213.203.244.244 to any
02450      0         0 count ip from any to 213.203.244.245
02451      0         0 count ip from 213.203.244.245 to any
02460      0         0 count ip from any to 213.203.244.246
02461      0         0 count ip from 213.203.244.246 to any
02470      0         0 count ip from any to 213.203.244.247
02471      0         0 count ip from 213.203.244.247 to any
02480      0         0 count ip from any to 213.203.244.248
02481      0         0 count ip from 213.203.244.248 to any
02490      0         0 count ip from any to 213.203.244.249
02491      0         0 count ip from 213.203.244.249 to any
02500      0         0 count ip from any to 213.203.244.250
02501      0         0 count ip from 213.203.244.250 to any
02510      0         0 count ip from any to 213.203.244.251
02511      0         0 count ip from 213.203.244.251 to any
02520      0         0 count ip from any to 213.203.244.252
02521      0         0 count ip from 213.203.244.252 to any
02530      0         0 count ip from any to 213.203.244.253
02531      0         0 count ip from 213.203.244.254 to any
02540      0         0 count ip from any to 213.203.244.254
65535      0         0 allow ip from any to any
server21#

Code:
server21# ipastat -x -R acc_241 -e -p 1m
+---------------------+---------------------+
| From                | To                  |
+---------------------+---------------------+
| 2004.08.01/00:00:00 | 2004.08.31/24:00:00 |
+---------------------+---------------------+

+---------+----------+-------+--------+
| Rule    | Info     | Bytes | Mbytes |
+---------+----------+-------+--------+
| acc_241 | acc_241i |     0 |      0 |
+---------+----------+-------+--------+
server21#


so, ich habe ueber die 241, ca. 500mb gedownloadet und es wird nichts angezeigt :(

hrm, leute kann mir einer von euch helfen ? ist sehr wichtig ...
 
Hallo p.kraschinski,

lobal {
maxchunk = 1G
update_db_time = 30s
db_dir = /var/ipa
lock_wait_time = 20s
}

"lobal" soll wohl "global" heißen?
Hast Du das auch so in Deiner Konfiguration?

Grüße

Jürgen
 
Regel 100 und 200 akzeptieren alle Pakete -- und dann sind sie fort. Deshalb kriegen die spaeteren Regeln ueberhaupt nichts mehr zu sehen. Wie man auch sehr schoen an den Counter ablesen kann.

BITTE ipfw(8) lesen!
 
reicht ess, wenn ich dan einfaxh 100 und 200 raus nehme ?

und dafuer dan einfach

allow ip from %ip% to any
allow ip from any to %ip%

einsetzt ?
 
Zuletzt bearbeitet:
ok also ganz langsam :) zum mitschreiben:
ipfw geht die regeln von oben nach unten durch und wenn eine regle auf das packet zutrifft dann wird diese angewendet und die suche ist beendet.

wenn du dir das durchliest, dann müsste dir in deinen retglen auffallen das deine 1. regel alles abfängt:
add allow ip from any to any
denn diese erlaubt alle protokolle von allen ips zu allen ips, also einfach alles!

so, mit dem was ich und mr.fixit dir gesagt haben müsste es eigentlich zu schaffen sein :D
 
okay, es leuft nu ... aber beim naechsten mahl waehre es vielleicht einfach mir einfach zu sagen, das ich das allow from any to any zum schluss anfuegen musst oder meint ihr net ?

schliesslich war das auch meine frage ? was ich machen muss und net was ich lesen muss.

aber @gfat thx, deine antwort hat echt geholfe, dass ipfw von oben nach unten die sachen durchgeht :)

mfg chris
 
Zuletzt bearbeitet:
Ein IPA Admin der "einfach nur benutzen" will. Süß.

[Edit]
@nakal:
{alle}\{Elessar} ;)
 
Zuletzt bearbeitet:
p.kraschinski schrieb:
okay, es leuft nu ... aber beim naechsten mahl waehre es vielleicht einfach mir einfach zu sagen, das ich das allow from any to any zum schluss anfuegen musst oder meint ihr net ?
Stimmt, und dann hättest Du das so gemacht, es hätte funktioniert und bei der nächsten Unregelmäßigkeit hättest Du wieder nicht gewußt, wo es klemmt und hättest hier wieder nachgefragt.

Stattdessen hast Du es jetzt wenigstens ein bißchen begriffen, und derjenige, der später bei der Forensuche auf diesen Thread stößt, hat dieselbe Gelegenheit.
 
@Steve: Deine Worte im CACHE des Allmächtigen Mainframes!

Wollen wir hoffen dass er gelernt hat, ansonsten müssen wir noch mal auf die allegemeinen Regeln verweisen die uns der Gute saintjoe am Anfang von jedem Board immer wieder aufs neue anbietet.

FBSD-Handbuch, manpages und Forensuche, mehr hab ich zum glücklich sein mit FBSD bis jetzt nicht gebraucht.
 
Zurück
Oben