From: Joachim Banzhaf <joachim.banzhaf@googlemail.com>
To: unlisted-recipients:; (no To-header on input)@mail.corp.redhat.com
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
"joachim.banzhaf" <joachim.banzhaf@googlemail.com>
Subject: Re: rpcbind allowed port range on linux
Date: Fri, 2 Dec 2016 09:32:02 +0100 [thread overview]
Message-ID: <CABW3MLc_7K_u_vHxD+BZ2ZQF1r96CjbokhVVzLmKAdK1MRoZ_g@mail.gmail.com> (raw)
In-Reply-To: <BD0BB270-C6F4-4129-8D21-A3E9A6970459@primarydata.com>
Hi Neil and Trond, thanks for the infos. Already helped a lot.
My primary goal is not to pin lockd to a specific port.
I want to prevent any ip service that does not ask for a specific port
to use ports I know are needed later for something else.
I thought, the mechanism is (sorry, had a cut&paste error here) by
defining range /proc/sys/net/ipv4/ip_local_port_range minus ports or
ranges in /proc/sys/net/ipv4/ip_local_reserved_ports (as described
here: http://lxr.free-electrons.com/source/Documentation/networking/ip-sysctl.txt#L809).
I wasn't sure, this mechanism is used here, but Neil, you already
confirmed at least part 1, and that is what happened. Just the
exclusion via /proc/sys/net/ipv4/ip_local_reserved_ports has not
worked.
To be specific, the ip_local_port_range is "40000 65299", and
ip_local_reserved_ports includes, among many others, 50000-50628 and
the port to protect but still picked for lockd was 50213.
Unfortunately, choosing another ip_local_port_range outside 50213 is
not possible, because there is no single range left that is big enough
(and there are other ports to protect like this one).
So, either ip_local_reserved_ports is not used (although I think it
should) or it is used but too long (at least sysctl used in SLES 12
has a bug: it cannot display the whole list) or the list is not
defined at the time lockd gets its port (I did not find where this is
defined, it is not in /etc/sysctl.conf, like ip_local_port_range).
BR,
Joachim
next prev parent reply other threads:[~2016-12-02 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 16:51 rpcbind allowed port range on linux Joachim Banzhaf
2016-12-02 0:14 ` NeilBrown
2016-12-02 0:50 ` Trond Myklebust
2016-12-02 8:32 ` Joachim Banzhaf [this message]
2016-12-02 17:33 ` Joachim Banzhaf
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=CABW3MLc_7K_u_vHxD+BZ2ZQF1r96CjbokhVVzLmKAdK1MRoZ_g@mail.gmail.com \
--to=joachim.banzhaf@googlemail.com \
--cc=linux-nfs@vger.kernel.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).