Код: Выделить всё
############### PIPES TO FTP for all users from BC-Gold network 20Mb ###############
${FwCMD} pipe 100 config bw 20Mbit/s queue 20
${FwCMD} queue 100 config pipe 100 weight 50 queue 20
${FwCMD} queue 1000 config pipe 100 weight 10 queue 20
${FwCMD} add 100 queue 100 log ip from ${IpIn} 20,21 to ${Admins}
${FwCMD} add 101 queue 1000 log ip from ${IpIn} 20,21 to { ${NetIn} or not ${Admins} }
${FwCMD} pipe 101 config bw 20Mbit/s queue 20
${FwCMD} queue 101 config pipe 101 weight 50 queue 20
${FwCMD} queue 1001 config pipe 101 weight 10 queue 20
${FwCMD} add 102 queue 101 log ip from ${Admins} to ${IpIn} 20,21
${FwCMD} add 103 queue 1001 log ip from { ${NetIn} or not ${Admins} } to ${IpIn} 20,21
############### PIPES TO filma.ua 10Mb for all users ###############
${FwCMD} pipe 200 config bw 10Mbit/s queue 20
${FwCMD} queue 200 config pipe 200 weight 50 queue 20
${FwCMD} queue 2000 config pipe 200 weight 10 queue 20
${FwCMD} add 104 queue 200 log ip from ${Filma} to ${Admins}
${FwCMD} add 105 queue 2000 log ip from ${Filma} to { ${NetIn} or not ${Admins} }
${FwCMD} add 106 allow log tcp from ${Filma} to ${Admins} in via ${LanOut_Bit} setup
${FwCMD} add 107 allow log tcp from ${Filma} to { ${NetIn} or not ${Admins} } in via ${LanOut_Bit} setup
${FwCMD} pipe 201 config bw 10Mbit/s queue 20
${FwCMD} queue 201 config pipe 201 weight 50 queue 20
${FwCMD} queue 2001 config pipe 201 weight 10 queue 20
${FwCMD} add 108 queue 201 log ip from ${Admins} to ${Filma}
${FwCMD} add 109 queue 2001 log ip from { ${NetIn} or not ${Admins} } to ${Filma}
${FwCMD} add 110 allow log tcp from ${Admins} to ${Filma} in via ${LanIn} setup
${FwCMD} add 111 allow log tcp from { ${NetIn} or not ${Admins} } to ${Filma} in via ${LanIn} setup
#################### PIPES ####################
внешние тарифы
############### USERS 320Kbit/s ###############
${FwCMD} add 200 pipe 1 log ip from { not ${NetIn} or ${Filma} } to table\(1\) out
${FwCMD} pipe 1 config bw 320000bit/s mask dst-ip 0xffffffff
${FwCMD} add 201 pipe 2 log ip from table\(1\) to { not ${IpIn} or ${Filma} } in
${FwCMD} pipe 2 config bw 320000bit/s mask src-ip 0xffffffff
${FwCMD} add 704 allow log tcp from table\(1\) to { not ${NetIn} or ${Filma} } in via ${LanIn} setup
############### USERS 512Kbit/s ###############
${FwCMD} add 202 pipe 3 log ip from { not ${NetIn} or ${Filma} } to table\(2\) out
${FwCMD} pipe 3 config bw 512000bit/s mask dst-ip 0xffffffff
${FwCMD} add 203 pipe 4 log ip from table\(2\) to { not ${IpIn} or not ${Filma} } in
${FwCMD} pipe 4 config bw 512000bit/s mask src-ip 0xffffffff
${FwCMD} add 705 allow log tcp from table\(2\) to { not ${NetIn} or not ${Filma} } in via ${LanIn} setup
############### USERS 640Kbit/s ###############
${FwCMD} add 204 pipe 5 log ip from { not ${NetIn} or not ${Filma} } to table\(3\) out
${FwCMD} pipe 5 config bw 640000bit/s mask dst-ip 0xffffffff
${FwCMD} add 205 pipe 6 log ip from table\(3\) to { not ${IpIn} or not ${Filma} } in
${FwCMD} pipe 6 config bw 640000bit/s mask src-ip 0xffffffff
${FwCMD} add 706 allow log tcp from table\(3\) to { not ${NetIn} or not ${Filma} } in via ${LanIn} setup
############### USERS 1024Kbit/s ###############
${FwCMD} add 206 pipe 7 log ip from { not ${NetIn} or not ${Filma} } to table\(4\) out
${FwCMD} pipe 7 config bw 1024000bit/s mask dst-ip 0xffffffff
${FwCMD} add 207 pipe 8 log ip from table\(4\) to { not ${IpIn} or not ${Filma} } in
${FwCMD} pipe 8 config bw 1024000bit/s mask src-ip 0xffffffff
${FwCMD} add 707 allow log tcp from table\(4\) to { not ${NetIn} or not ${Filma} } in via ${LanIn} setup
############### USERS 2048Kbit/s ###############
${FwCMD} add 208 pipe 9 log ip from { not ${Filma} or not ${NetIn} } to table\(5\) out
${FwCMD} pipe 9 config bw 2048000bit/s mask dst-ip 0xffffffff
${FwCMD} add 209 pipe 10 log ip from table\(5\) to { not ${Filma} or ${IpIn} } in
${FwCMD} pipe 10 config bw 2048000bit/s mask src-ip 0xffffffff
${FwCMD} add 708 allow log tcp from table\(5\) to { not ${Filma} or not ${NetIn} } in via ${LanIn} setup
############### USERS 4096Kbit/s ###############
${FwCMD} add 210 pipe 11 log ip from { not ${NetIn} or not ${Filma} } to table\(6\) out
${FwCMD} pipe 11 config bw 4096000bit/s mask dst-ip 0xffffffff
${FwCMD} add 211 pipe 12 log ip from table\(6\) to { not ${IpIn} or not ${Filma} } in
${FwCMD} pipe 12 config bw 4096000bit/s mask src-ip 0xffffffff
${FwCMD} add 709 allow log tcp from table\(6\) to { not ${NetIn} or not ${Filma} } in via ${LanIn} setup
############### ADMINS ###############
${FwCMD} pipe 23 config bw 100Mbit/s queue 20 mask dst-ip 0xffffffff
${FwCMD} queue 23 config pipe 23 weight 5 queue 20
${FwCMD} add 300 queue 23 log ip from not ${NetIn} to ${Admins} out
${FwCMD} pipe 25 config bw 100Mbit/s queue 20 mask src-ip 0xffffffff
${FwCMD} queue 25 config pipe 25 weight 5 queue 20
${FwCMD} add 301 queue 25 log ip from ${Admins} to { not ${IpIn} or not ${Filma} } in
${FwCMD} add 710 allow log tcp from ${Admins} to not ${NetIn} in via ${LanIn} setup
Выхлоп фаервола
Код: Выделить всё
00001 2154 171876 allow ip from any to any via lo0
00036 22714 1263332 nat 1 ip from 10.0.0.0/24 to any out via rl0
00038 44163 60397988 nat 1 ip from any to 10.60.77.51 in via rl0
00054 632 37930 allow icmp from any to any icmptypes 0,3,4,8,10,11
00100 0 0 queue 100 log logamount 100 ip from 10.0.0.1 20,21 to 10.0.0.65,10.0.0.135,10.0.0.199
00101 0 0 queue 1000 log logamount 100 ip from 10.0.0.1 20,21 to { 10.0.0.0/24 or not dst-ip 10.0.0.65,10.0.0.135,10.0.0.199 }
00102 0 0 queue 101 log logamount 100 ip from 10.0.0.65,10.0.0.135,10.0.0.199 to 10.0.0.1 dst-port 20,21
00103 0 0 queue 1001 log logamount 100 ip from { 10.0.0.0/24 or not 10.0.0.65,10.0.0.135,10.0.0.199 } to 10.0.0.1 dst-port 20,21
00104 0 0 queue 200 log logamount 100 ip from 91.192.152.70,91.192.152.107 to 10.0.0.65,10.0.0.135,10.0.0.199
00105 50686 76017432 queue 2000 log logamount 100 ip from 91.192.152.70,91.192.152.107 to { 10.0.0.0/24 or not dst-ip 10.0.0.65,10.0.0.135,10.0.0.199 }
00106 0 0 allow log logamount 100 tcp from 91.192.152.70,91.192.152.107 to 10.0.0.65,10.0.0.135,10.0.0.199 in via rl0 setup
00107 0 0 allow log logamount 100 tcp from 91.192.152.70,91.192.152.107 to { 10.0.0.0/24 or not dst-ip 10.0.0.65,10.0.0.135,10.0.0.199 } in via rl0 setup
00108 0 0 queue 201 log logamount 100 ip from 10.0.0.65,10.0.0.135,10.0.0.199 to 91.192.152.70,91.192.152.107
00109 25342 1013704 queue 2001 log logamount 100 ip from { 10.0.0.0/24 or not 10.0.0.65,10.0.0.135,10.0.0.199 } to 91.192.152.70,91.192.152.107
00110 0 0 allow log logamount 100 tcp from 10.0.0.65,10.0.0.135,10.0.0.199 to 91.192.152.70,91.192.152.107 in via vr0 setup
00111 0 0 allow log logamount 100 tcp from { 10.0.0.0/24 or not 10.0.0.65,10.0.0.135,10.0.0.199 } to 91.192.152.70,91.192.152.107 in via vr0 setup
00200 10434 13545694 pipe 1 log logamount 100 ip from { not 10.0.0.0/24 or 91.192.152.70,91.192.152.107 } to table(1) out
00201 6661 608133 pipe 2 log logamount 100 ip from table(1) to { not 10.0.0.1 or dst-ip 91.192.152.70,91.192.152.107 } in
00202 0 0 pipe 3 log logamount 100 ip from { not 10.0.0.0/24 or 91.192.152.70,91.192.152.107 } to table(2) out
00203 0 0 pipe 4 log logamount 100 ip from table(2) to { not 10.0.0.1 or not dst-ip 91.192.152.70,91.192.152.107 } in
00204 5927 8645514 pipe 5 log logamount 100 ip from { not 10.0.0.0/24 or not 91.192.152.70,91.192.152.107 } to table(3) out
00205 3167 135529 pipe 6 log logamount 100 ip from table(3) to { not 10.0.0.1 or not dst-ip 91.192.152.70,91.192.152.107 } in
00206 0 0 pipe 7 log logamount 100 ip from { not 10.0.0.0/24 or not 91.192.152.70,91.192.152.107 } to table(4) out
00207 0 0 pipe 8 log logamount 100 ip from table(4) to { not 10.0.0.1 or not dst-ip 91.192.152.70,91.192.152.107 } in
00208 25593 38091040 pipe 9 log logamount 100 ip from { not 91.192.152.70,91.192.152.107 or not 10.0.0.0/24 } to table(5) out
00209 200 12327 pipe 10 log logamount 100 ip from table(5) to { not 91.192.152.70,91.192.152.107 or dst-ip 10.0.0.1 } in
00210 0 0 pipe 11 log logamount 100 ip from { not 10.0.0.0/24 or not 91.192.152.70,91.192.152.107 } to table(6) out
00211 0 0 pipe 12 log logamount 100 ip from table(6) to { not 10.0.0.1 or not dst-ip 91.192.152.70,91.192.152.107 } in
00300 0 0 queue 23 log logamount 100 ip from not 10.0.0.0/24 to 10.0.0.65,10.0.0.135,10.0.0.199 out
00301 0 0 queue 25 log logamount 100 ip from 10.0.0.65,10.0.0.135,10.0.0.199 to { not 10.0.0.1 or not dst-ip 91.192.152.70,91.192.152.107 } in
00400 132345 123830667 allow tcp from any to any established
00704 246 11964 allow log logamount 100 tcp from table(1) to { not 10.0.0.0/24 or dst-ip 91.192.152.70,91.192.152.107 } in via vr0 setup
00705 0 0 allow log logamount 100 tcp from table(2) to { not 10.0.0.0/24 or not dst-ip 91.192.152.70,91.192.152.107 } in via vr0 setup
00706 11 528 allow log logamount 100 tcp from table(3) to { not 10.0.0.0/24 or not dst-ip 91.192.152.70,91.192.152.107 } in via vr0 setup
00707 0 0 allow log logamount 100 tcp from table(4) to { not 10.0.0.0/24 or not dst-ip 91.192.152.70,91.192.152.107 } in via vr0 setup
00708 0 0 allow log logamount 100 tcp from table(5) to { not 91.192.152.70,91.192.152.107 or not dst-ip 10.0.0.0/24 } in via vr0 setup
00709 0 0 allow log logamount 100 tcp from table(6) to { not 10.0.0.0/24 or not dst-ip 91.192.152.70,91.192.152.107 } in via vr0 setup
00710 0 0 allow log logamount 100 tcp from 10.0.0.65,10.0.0.135,10.0.0.199 to not 10.0.0.0/24 in via vr0 setup
05000 229 11268 deny log logamount 100 tcp from any to 10.60.77.51 in via rl0 setup
06000 151 7432 allow tcp from 10.0.0.0/24 to 10.0.0.0/24 in via vr0
06001 0 0 allow tcp from 10.0.0.0/24 to 10.0.0.0/24 out via vr0
06002 125 9834 allow udp from 10.0.0.0/24 to 10.0.0.0/24 in via vr0
06003 96 25360 allow udp from 10.0.0.0/24 to 10.0.0.0/24 out via vr0
06004 0 0 allow icmp from 10.0.0.0/24 to 10.0.0.0/24 in via vr0
06005 0 0 allow icmp from 10.0.0.0/24 to 10.0.0.0/24 out via vr0
07000 267 12920 allow ip from 10.60.77.51 to any out xmit rl0
10000 342 34138 deny log logamount 100 ip from any to any
65535 0 0 deny ip from any to any
Код: Выделить всё
00001: 320.000 Kbit/s 0 ms 50 sl. 2 queues (64 buckets) droptail
mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
8 ip 0.0.0.0/0 10.0.0.136/0 9529 12179036 0 0 1
12 ip 0.0.0.0/0 10.0.0.12/0 1591 2018520 0 0 0
00002: 320.000 Kbit/s 0 ms 50 sl. 2 queues (64 buckets) droptail
mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
16 ip 10.0.0.136/0 0.0.0.0/0 6277 648870 0 0 0
24 ip 10.0.0.12/0 0.0.0.0/0 980 74207 0 0 0
00100: 20.000 Mbit/s 0 ms 20 sl. 0 queues (1 buckets) droptail
00003: 512.000 Kbit/s 0 ms 50 sl. 0 queues (64 buckets) droptail
00101: 20.000 Mbit/s 0 ms 20 sl. 0 queues (1 buckets) droptail
00004: 512.000 Kbit/s 0 ms 50 sl. 0 queues (64 buckets) droptail
00200: 10.000 Mbit/s 0 ms 20 sl. 0 queues (1 buckets) droptail
00005: 640.000 Kbit/s 0 ms 50 sl. 1 queues (64 buckets) droptail
mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
10 ip 0.0.0.0/0 10.0.0.10/0 5927 8645514 0 0 0
00201: 10.000 Mbit/s 0 ms 20 sl. 0 queues (1 buckets) droptail
00023: 100.000 Mbit/s 0 ms 20 sl. 0 queues (64 buckets) droptail
00006: 640.000 Kbit/s 0 ms 50 sl. 1 queues (64 buckets) droptail
mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
20 ip 10.0.0.10/0 0.0.0.0/0 3167 135529 0 0 0
00007: 1.024 Mbit/s 0 ms 50 sl. 0 queues (64 buckets) droptail
00025: 100.000 Mbit/s 0 ms 20 sl. 0 queues (64 buckets) droptail
00008: 1.024 Mbit/s 0 ms 50 sl. 0 queues (64 buckets) droptail
00009: 2.048 Mbit/s 0 ms 50 sl. 1 queues (64 buckets) droptail
mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
61 ip 0.0.0.0/0 10.0.0.253/0 25593 38091040 0 0 0
00010: 2.048 Mbit/s 0 ms 50 sl. 1 queues (64 buckets) droptail
mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
58 ip 10.0.0.253/0 0.0.0.0/0 200 12327 0 0 0
00011: 4.096 Mbit/s 0 ms 50 sl. 0 queues (64 buckets) droptail
00012: 4.096 Mbit/s 0 ms 50 sl. 0 queues (64 buckets) droptail
q00100: weight 50 pipe 100 20 sl. 0 queues (1 buckets) droptail
q00101: weight 50 pipe 101 20 sl. 0 queues (1 buckets) droptail
q00200: weight 50 pipe 200 20 sl. 0 queues (1 buckets) droptail
q01001: weight 10 pipe 101 20 sl. 0 queues (1 buckets) droptail
q00201: weight 50 pipe 201 20 sl. 0 queues (1 buckets) droptail
q01000: weight 10 pipe 100 20 sl. 0 queues (1 buckets) droptail
q00023: weight 5 pipe 23 20 sl. 0 queues (1 buckets) droptail
q00025: weight 5 pipe 25 20 sl. 0 queues (1 buckets) droptail
q02000: weight 10 pipe 200 20 sl. 1 queues (1 buckets) droptail
mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
0 tcp 91.192.152.107/1306 10.0.0.253/50737 50686 76017432 0 0 0
q02001: weight 10 pipe 201 20 sl. 1 queues (1 buckets) droptail
mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
0 tcp 10.0.0.253/50737 91.192.152.107/1306 25342 1013704 0 0 0
Где я провтыкал!?