Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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.

share|improve this question

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:

# iptables -I INPUT -p udp --dport 1337 -j REJECT

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.