From: Taehee Yoo <ap420073@gmail.com>
To: pablo@netfilter.org, fw@strlen.de, netfilter-devel@vger.kernel.org
Cc: ap420073@gmail.com
Subject: [PATCH V3 0/5] netfilter: nf_nat_snmp_basic: use ASN.1 decoder
Date: Mon, 20 Nov 2017 00:05:54 +0900 [thread overview]
Message-ID: <20171119150559.18125-1-ap420073@gmail.com> (raw)
The goal of this patch set are to use the ASN.1 decoder library
to parse SNMP ASN.1 payload.
This patch set are same as previous patch
"[PATCH V2]netfilter: nf_nat_snmp_basic: use asn1 decoder library".
My test environment are below.
#Network
Client <-------------> Netfilter FW <-------------> SNMP Server
192.168.3.2 192.168.3.1 192.168.4.1 192.168.4.2
#FW commands
iptables -t raw -I PREROUTING -p udp -m multiport --dports 161,162 \
-j CT --helper snmp
echo 'file nf_nat_snmp_basic.c +p' > \
/sys/kernel/debug/dynamic_debug/control
#SNMP Server commands
sudo ip r a 192.168.3.2 via 192.168.4.1 dev enp2s0
#Client commands
sudo ip r a 192.168.4.2 via 192.168.3.1 dev enp3s0
To test basic snmp test, I used snmpwalk command because it is easy to use
snmpwalk -v <1 or 2c> -c public <ip address> OID
example)
snmpwalk -v 2c -c public 192.168.4.2 .1.3.6.1.2.1.4.21
so that we can see this message from dmesg.
"snmp_helper: 192.168.3.2 to 192.168.4.1"
And, to test snmp trap test, I used snmptrap command.
snmptrap -v 1 -c public 192.168.3.2 .1 192.168.4.2 0 0 0 .1 a \
192.168.4.2
snmptrap -v 2c -c public 192.168.3.2 .1 .1 .1 a 192.168.4.2
SNMPv1 trap includes two ip address in payload. so we can see below
message twice.
"snmp_helper: 192.168.4.2 to 192.168.3.1"
If you want to see asn1 decoder debug message, please use below command
echo 'file asn1_decoder.c +p' > /sys/kernel/debug/dynamic_debug/control
V3 :
- be separated by previous patch.
V2 :
- Add missing nf_nat_snmp_basic.asn1 file
V1 :
- Initial patch
Taehee Yoo (5):
netfilter: nf_nat_snmp_basic: remove useless comment
netfilter: nf_nat_snmp_basic: remove debug parameter
netfilter: nf_nat_snmp_basic: replace ctinfo with dir.
netfilter: nf_nat_snmp_basic: use nf_ct_helper_log
netfilter: nf_nat_snmp_basic: use asn1 decoder library
net/ipv4/netfilter/Kconfig | 1 +
net/ipv4/netfilter/Makefile | 5 +-
net/ipv4/netfilter/nf_nat_snmp_basic.asn1 | 177 +++++
net/ipv4/netfilter/nf_nat_snmp_basic.c | 1175 ++---------------------------
4 files changed, 245 insertions(+), 1113 deletions(-)
create mode 100644 net/ipv4/netfilter/nf_nat_snmp_basic.asn1
--
2.9.3
next reply other threads:[~2017-11-19 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 15:05 Taehee Yoo [this message]
2017-11-19 15:05 ` [PATCH V3 1/5] netfilter: nf_nat_snmp_basic: remove useless comment Taehee Yoo
2017-11-19 15:05 ` [PATCH V3 2/5] netfilter: nf_nat_snmp_basic: remove debug parameter Taehee Yoo
2017-11-19 15:05 ` [PATCH V3 3/5] netfilter: nf_nat_snmp_basic: replace ctinfo with dir Taehee Yoo
2017-11-19 15:05 ` [PATCH V3 4/5] netfilter: nf_nat_snmp_basic: use nf_ct_helper_log Taehee Yoo
2017-11-19 15:05 ` [PATCH V3 5/5] netfilter: nf_nat_snmp_basic: use asn1 decoder library Taehee Yoo
2017-12-06 8:15 ` [PATCH V3 0/5] netfilter: nf_nat_snmp_basic: use ASN.1 decoder Pablo Neira Ayuso
2017-12-06 9:06 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171119150559.18125-1-ap420073@gmail.com \
--to=ap420073@gmail.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).