* NFSv4 guest opens random ports
@ 2014-01-19 18:27 Justus Ranvier
2014-01-19 19:16 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Justus Ranvier @ 2014-01-19 18:27 UTC (permalink / raw)
To: linux-nfs
I have systems running Gentoo Linux mounting shares hosted on a Gentoo
Linux server. All are running 3.12.8 kernels and using NFS 4.
I've followed all instructions I can find for fixing everything to a
static port, but I still see one instance ofrandom port behavior.
A kernel process (does not display a PID in netstat) on the guests is
opening listening sockets on random high-numbered ports. The server is
attempting to contact those guests via random low-numbered ports, which
my firewall is blocking.
Despite these packets being blocked, I haven't noticed any adverse
effects - everything appears to work normally except for my system logs
on the server being spammed with blocked outgoing connection attempts.
What is this random port the client is trying to accept connections on,
and how do I make it listen on a fixed port instead of a random one so
that I can write useful firewall rules?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NFSv4 guest opens random ports
2014-01-19 18:27 NFSv4 guest opens random ports Justus Ranvier
@ 2014-01-19 19:16 ` Trond Myklebust
2014-01-20 14:54 ` Justus Ranvier
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2014-01-19 19:16 UTC (permalink / raw)
To: Justus Ranvier; +Cc: linuxnfs
On Jan 19, 2014, at 13:27, Justus Ranvier <justusranvier@gmail.com> wrote:
> I have systems running Gentoo Linux mounting shares hosted on a Gentoo
> Linux server. All are running 3.12.8 kernels and using NFS 4.
>
> I've followed all instructions I can find for fixing everything to a
> static port, but I still see one instance ofrandom port behavior.
>
> A kernel process (does not display a PID in netstat) on the guests is
> opening listening sockets on random high-numbered ports. The server is
> attempting to contact those guests via random low-numbered ports, which
> my firewall is blocking.
>
> Despite these packets being blocked, I haven't noticed any adverse
> effects - everything appears to work normally except for my system logs
> on the server being spammed with blocked outgoing connection attempts.
>
> What is this random port the client is trying to accept connections on,
> and how do I make it listen on a fixed port instead of a random one so
> that I can write useful firewall rules?
>
That’s probably the NFSv4 callback port. Please see your kernel Documentation/kernel-parameters.txt for how to set the nfs.callback_tcpport kernel/module option.
--
Trond Myklebust
Linux NFS client maintainer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NFSv4 guest opens random ports
2014-01-19 19:16 ` Trond Myklebust
@ 2014-01-20 14:54 ` Justus Ranvier
0 siblings, 0 replies; 3+ messages in thread
From: Justus Ranvier @ 2014-01-20 14:54 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linuxnfs
On 01/19/2014 07:16 PM, Trond Myklebust wrote:
> On Jan 19, 2014, at 13:27, Justus Ranvier <justusranvier@gmail.com> wrote:
>
>> I have systems running Gentoo Linux mounting shares hosted on a Gentoo
>> Linux server. All are running 3.12.8 kernels and using NFS 4.
>>
>> I've followed all instructions I can find for fixing everything to a
>> static port, but I still see one instance ofrandom port behavior.
>>
>> A kernel process (does not display a PID in netstat) on the guests is
>> opening listening sockets on random high-numbered ports. The server is
>> attempting to contact those guests via random low-numbered ports, which
>> my firewall is blocking.
>>
>> Despite these packets being blocked, I haven't noticed any adverse
>> effects - everything appears to work normally except for my system logs
>> on the server being spammed with blocked outgoing connection attempts.
>>
>> What is this random port the client is trying to accept connections on,
>> and how do I make it listen on a fixed port instead of a random one so
>> that I can write useful firewall rules?
>>
> That’s probably the NFSv4 callback port. Please see your kernel Documentation/kernel-parameters.txt for how to set the nfs.callback_tcpport kernel/module option.
Thanks you, that was indeed the problem. I was able to set this port via
the kernel command line and resolve my firewalling difficulties.
I thought I'd be able to set that parameter via sysctl.conf, in the same
manner as sys.fs.nfs.nlm_tcpport and sys.fs.nfs.nlm_udpport, but that
method returns an error.
Would it be possible to make this port configurable in the same manner
as lock manager ports via sysctl, or as an explicit compile time option?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-20 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-19 18:27 NFSv4 guest opens random ports Justus Ranvier
2014-01-19 19:16 ` Trond Myklebust
2014-01-20 14:54 ` Justus Ranvier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox