Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

 
discard

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.