Is it possible to force NIS to connect using TCP instead of UDP? I've scoured the documentation for both ypserv
(to force listening on TCP only) and ypbind
(to connect over TCP only) but found nothing (only an option to specify the listening port). I'm afraid somebody is going to answer "yes, if you compile from source..."
And ypserv
listens on both protocols, so why doesn't ypbind
try TCP when UDP fails?
Update
I tried Phil's solution, but it turns out that ypbind first contacts portmap on UDP port 111. If it doesn't get a UDP response it just gives up.
I could only come up with one solution, and a quick google shows the same. Run ypserv on a specific port, then configure iptables on the server to block incoming udp connections, for example if you are running ybserv on say port 1337:
although I am unclear what mechanism ybbind uses to determine whether to use UDP or TCP. Using a firewall rule like that might just result in ypbind attempting a UDP connection, getting blocked, and giving up.