[FreeBSD 7.2] snmp_pf.so

View: New views
5 Messages — Rating Filter:   Alert me  

[FreeBSD 7.2] snmp_pf.so

by Maciej Wierzbicki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I am running bsnmpd using the default configuration from
/etc/snmpd.config with pf module (theoreticaly) loaded:

#
# pf(4) module
#
begemotSnmpdModulePath."pf"     = "/usr/lib/snmp_pf.so"

As far as I understand, with this module loaded I should have in mib
tree pf-related oids, as described in /usr/share/snmp/defs/pf_tree.def

But when I am using bsnmpwalk to search them, no hits:
# bsnmpwalk | grep ^pf
#

Oids from mibII_tree.def are available, as mibII is loaded as default,
so I assume that my bsnmpd is not including snmp_pf.so somehow. What I
am missing?

TIA
--
|  /"\   ASCII ribbon    |            Maciej Wierzbicki           |
|  \ / campaign against  |                VOO1-RIPE               |
|   X    HTML in email   |        At paranoia's poison door       |
|  / \     and news      |  A suspicious mind is a healthy mind.  |
_______________________________________________
freebsd-pf@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscribe@..."

Re: [FreeBSD 7.2] snmp_pf.so

by Ondoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

without specifying OID, it only walks the mib-2 subtree.
try
# bsnmpwalk fokus
the objects under 1.3.6.1.4.1.12325.1.200 are the pf stuff.

regards,


On Thu, Oct 1, 2009 at 3:06 PM, Maciej Wierzbicki
<voovoos-fpf@...> wrote:

> Hi
>
> I am running bsnmpd using the default configuration from
> /etc/snmpd.config with pf module (theoreticaly) loaded:
>
> #
> # pf(4) module
> #
> begemotSnmpdModulePath."pf"     = "/usr/lib/snmp_pf.so"
>
> As far as I understand, with this module loaded I should have in mib
> tree pf-related oids, as described in /usr/share/snmp/defs/pf_tree.def
>
> But when I am using bsnmpwalk to search them, no hits:
> # bsnmpwalk | grep ^pf
> #
>
> Oids from mibII_tree.def are available, as mibII is loaded as default,
> so I assume that my bsnmpd is not including snmp_pf.so somehow. What I
> am missing?
>
> TIA
> --
> |  /"\   ASCII ribbon    |            Maciej Wierzbicki           |
> |  \ / campaign against  |                VOO1-RIPE               |
> |   X    HTML in email   |        At paranoia's poison door       |
> |  / \     and news      |  A suspicious mind is a healthy mind.  |
> _______________________________________________
> freebsd-pf@... mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-pf
> To unsubscribe, send any mail to "freebsd-pf-unsubscribe@..."
>
_______________________________________________
freebsd-pf@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscribe@..."

Re: [FreeBSD 7.2] snmp_pf.so

by Maciej Wierzbicki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ondoy wrote on 2009-10-01 11:45:

> without specifying OID, it only walks the mib-2 subtree.
> try
> # bsnmpwalk fokus
> the objects under 1.3.6.1.4.1.12325.1.200 are the pf stuff.

Indeed, thanks.

But then I have another question. bsnmpwalk parses some of pf oids and
then returns an error:
Agent localhost:snmp returned error
1.3.6.1.4.1.12325.1.200.1.9.2.1.20.1 caused error - General error

Its pfTablesTblPktsOutXPass in pfTables, I believe. That error is a
known issue or I am missing something again?

PS also, is it possible to count traffic on interface using snmp per ip
address bound to it (not per whole interface)?
PPS maybe I should address this discussion to freebsd-net instead?
--
*   Maciej Wierzbicki * At paranoia's poison door  *
*   VOO1-RIPE   *
_______________________________________________
freebsd-pf@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscribe@..."

Re: [FreeBSD 7.2] snmp_pf.so

by Shteryana Shopova-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

2009/10/1 Maciej Wierzbicki <voovoos-fpf@...>:

> Ondoy wrote on 2009-10-01 11:45:
>
>> without specifying OID, it only walks the mib-2 subtree.
>> try
>> # bsnmpwalk fokus
>> the objects under 1.3.6.1.4.1.12325.1.200 are the pf stuff.
>
> Indeed, thanks.
>
> But then I have another question. bsnmpwalk parses some of pf oids and then
> returns an error:
> Agent localhost:snmp returned error
> 1.3.6.1.4.1.12325.1.200.1.9.2.1.20.1 caused error - General error
>

bsnmpwalk -i /usr/share/snmp/defs/pf_tree.def begemotPf

By default only the mibII_tree.def and tree.def OID to strings are
parsed - you have to tell bsnmpwalk to parse the begemotPf OIDs
explicitly .

> Its pfTablesTblPktsOutXPass in pfTables, I believe. That error is a known
> issue or I am missing something again?
>

http://people.freebsd.org/~syrinx/snmp/pf_snmp.c-01102009-01.diff -
this should fix the error.

> PS also, is it possible to count traffic on interface using snmp per ip
> address bound to it (not per whole interface)?

Hm, I think this should be supposedly done by fetching
pfTablesAddrTable, but currently it does not return any data...I am
not sure when I will have time to look at this, but of course everyone
is more than wellcome to submit a patch :)

> PPS maybe I should address this discussion to freebsd-net instead?
> --

cheers,
Shteryana
_______________________________________________
freebsd-pf@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscribe@..."

Re: [FreeBSD 7.2] snmp_pf.so

by Maciej Wierzbicki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shteryana Shopova wrote on 2009-10-01 15:06:

> http://people.freebsd.org/~syrinx/snmp/pf_snmp.c-01102009-01.diff -
> this should fix the error.

It does, but then it produces infinite amount of
1.3.6.1.4.1.12325.1.200.1.10.2.1.2 without values, so I must break
bsnmpwalk by hand:

[...]
pfTablesTblPktsOutBlock[1] = 0
pfTablesTblPktsOutXPass[1] = 0
pfAltqQueueNumber.0 = 0
1.3.6.1.4.1.12325.1.200.1.10.2.1.2 =
1.3.6.1.4.1.12325.1.200.1.10.2.1.2 =
[tons of 1.3.6.1.4.1.12325.1.200.1.10.2.1.2 =]

> Hm, I think this should be supposedly done by fetching
> pfTablesAddrTable, but currently it does not return any data...I am
> not sure when I will have time to look at this, but of course everyone
> is more than wellcome to submit a patch :)

Can you give a tip to which files I should look into?

--
*   Maciej Wierzbicki * At paranoia's poison door  *
*   VOO1-RIPE   *
_______________________________________________
freebsd-pf@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscribe@..."