From: "Ian Latter" <Ian.Latter@mq.edu.au>
To: netfilter-devel@lists.netfilter.org
Cc: marcelo.lima@dcc.unicamp.br
Subject: [PATCH] RPC match and conntrack modules v2.1
Date: Fri, 10 Jan 2003 19:26:57 +1100 [thread overview]
Message-ID: <200301100926.h0A9QwA05558@singularity.tronunltd.com> (raw)
Hello all,
I too had too much Xmas idle time and for some reason I couldn't get
enough coding done ... too long between programming sessions, me
thinks.
I have uploaded, to the ftp.netfilter.org site, a copy of the new patch-
o-matic ready code. Let me know what you think of it ... I don't have a
lot of need for RPC traffic filtering, but when I realised that the Linux
kernel filtering for RPCs was limited to the old "record-rpc" modules, I
had to upgrade them ... I wanted some of that CheckPoint functionality
in my favourite filtering API :oP
The new modules will allow filtering on RPC procedures (by name or
number). The intended usage of these modules would be with a ruleset
like;
# New session from client to server (rpc portmapper get)
-A PREROUTING -t nat -i eth0 -p udp -m rpc --rpcs 100002
-s ${client} --sport 0:1023 -d ${server} --dport 111
-j ACCEPT
# Continued session from client to client (port mapper answer)
-A PREROUTING -t nat -i eth1 -m state -p udp
-s ${server} --sport 111 -d ${client} --dport 0:1023
--state ESTABLISHED -j ACCEPT
# New session from client to server (procedure call)
-A PREROUTING -t nat -i eth0 -m state -p udp
-s ${client} --sport 0:65535
-d ${server} --dport 32000:34000
--state ESTABLISHED,RELATED -j ACCEPT
# Continued session from client to server (procedure response)
-A PREROUTING -t nat -i eth1 -m state -p udp
-s ${server} --sport 32000:34000
-d ${client} --dport 0:65535
--state ESTABLISHED -j ACCEPT
Which would allow rusers to execute from client to server;
user@client# rusers $server
Note that if that first rule was without the --rpcs option;
-A PREROUTING -t nat -i eth0 -p udp -m rpc
-s ${client} --sport 0:1023 -d ${server} --dport 111
-j ACCEPT
... then it would behave like the existing oldnat module; simply
"recording" RPC get commands via the portmapper, and letting
them through from the same host when they're a complete
procedure call.
Also note that I've updated the module for newnat, and it compiles
cleanly against 2.4.20. I was half tempted to author the NAT module
to go with the conntrack and match, but this code has taken too
much time already.
0f759135c2b2aae5bc39b3ed0f633749 pom-rpc-030110-01.tgz
11371 bytes size
Comments welcome and appreciated.
Regards,
--
Ian Latter
Internet and Networking Security Officer
Macquarie University
next reply other threads:[~2003-01-10 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-10 8:26 Ian Latter [this message]
2003-01-10 13:45 ` [PATCH] RPC match and conntrack modules v2.1 Harald Welte
-- strict thread matches above, loose matches on Subject: below --
2003-01-10 22:47 Ian Latter
2003-01-11 0:05 ` Harald Welte
2003-01-12 10:33 Ian Latter
2003-01-13 1:32 ` Harald Welte
2003-01-13 1:57 Ian Latter
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=200301100926.h0A9QwA05558@singularity.tronunltd.com \
--to=ian.latter@mq.edu.au \
--cc=marcelo.lima@dcc.unicamp.br \
--cc=netfilter-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.