#782226 rpcbind: -h ignored, still binds on all interfaces

Package:
rpcbind
Source:
rpcbind
Description:
converts RPC program numbers into universal addresses
Submitter:
Toni Mueller
Date:
2015-04-09 11:48:06 UTC
Severity:
normal
#782226#5
Date:
2015-04-09 11:46:21 UTC
From:
To:
Dear Maintainer,

the manpage says that I can use "-h address" to make rpcbind only bind
to this address (or several, if used multiple times), instead if
IN_ADDR_ANY.

Unfortunately, this is not true. Consider this:

$ ps auwwx|grep rpc
root      3862  0.0  0.0  37068  2396 ?        Ss   12:39   0:00 /sbin/rpcbind -h 127.0.0.1 -h ::1 -l
$

$ netstat -an |grep -F ":111"
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp6       0      0 :::111                  :::*                    LISTEN
udp        0      0 127.0.0.1:111           0.0.0.0:*
udp6       0      0 ::1:111                 :::*
$

# lsof -i udp@0.0.0.0:111
COMMAND  PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
rpcbind 3862 root    6u  IPv4 39531536      0t0  UDP localhost:sunrpc
#

In other words, rpcbind still binds to IN_ADDR_ANY, despite the man page
saying otherwise.

Please also consider these related bugs: #621807, #737276


Kind regards,
--Toni++
similar