Hi,
Due to some issues with my ISP I've decided to do a traffic accounting on my server. Here's what I have trouble with:
Server is multihomed, I need to do a traffic accounting per each IP and then, in some cases, I need to do a per protocol statistics.
Basic skeleton is as follows:
I understand that rules evaluated through ip-pub-1-in/ip-pub-2-in will be processed later down trough other filtering rules (unless quick keyword specified), but I thought that traffic passed trough it would be accounted. But it's not. I see evaluations, but all 0's afterward:
Obviously, I'm missing something. :/
Due to some issues with my ISP I've decided to do a traffic accounting on my server. Here's what I have trouble with:
Server is multihomed, I need to do a traffic accounting per each IP and then, in some cases, I need to do a per protocol statistics.
Basic skeleton is as follows:
Code:
ext_if="em0"
IP-PUB-1="192.0.2.1"
IP-PUB-2="192.0.2.2"
# some normalization rules
# some nat/rdr rules
# here I just want to account the traffic and let it be decided later what to do with it
pass in on $ext_if from any to $IP-PUB-1 label ip-pub-1-in
pass in on $ext_if from any to $IP-PUB-2 label ip-pub-2-in
block in all
# --< additional rules here >--
# per proto per IP
pass in quick proto tcp from <ssh_trusted> to $IP-PUB-1 port 22 keep state label pub1-ssh-in
I understand that rules evaluated through ip-pub-1-in/ip-pub-2-in will be processed later down trough other filtering rules (unless quick keyword specified), but I thought that traffic passed trough it would be accounted. But it's not. I see evaluations, but all 0's afterward:
# pfctl -vsl
Code:
ip-pub-1-in 635 0 0 0 0 0 0 0
Obviously, I'm missing something. :/