From owner-freebsd-questions Wed Nov 19 14:29:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA06638 for questions-outgoing; Wed, 19 Nov 1997 14:29:29 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from tornado.cisco.com (tornado.cisco.com [171.69.104.22]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA06629 for ; Wed, 19 Nov 1997 14:29:23 -0800 (PST) (envelope-from bmcgover@bmcgover-pc.cisco.com) Received: from bmcgover-pc.cisco.com (bmcgover-pc.cisco.com [171.69.104.147]) by tornado.cisco.com (8.8.5-Cisco.1/8.6.5) with ESMTP id RAA09748 for ; Wed, 19 Nov 1997 17:28:45 -0500 (EST) Received: from bmcgover-pc.cisco.com (localhost.cisco.com [127.0.0.1]) by bmcgover-pc.cisco.com (8.8.7/8.8.7) with ESMTP id RAA21347 for ; Wed, 19 Nov 1997 17:28:43 -0500 (EST) (envelope-from bmcgover@bmcgover-pc.cisco.com) Message-Id: <199711192228.RAA21347@bmcgover-pc.cisco.com> To: questions@freebsd.org Subject: Changing YPSERV to fixed port... Date: Wed, 19 Nov 1997 17:28:43 -0500 From: Brian McGovern Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Quick question for you. Due to some firewalling that I want to do, I want to be able to bind either ypserv or ypbind (not sure which yet) to a fixed port number, so I can open a firewall hole for the service, so that the firewalled server can provide NIS, without allowing telnet, or other services TO the server. I've been digging through yp_main.c of ypserv, and ran across the line transp = svcudp_create(sock); I looked this up under "man rpc", and found that this will create a new socket, and bind it to an arbitrary port number. I was wondering, therefore, if I wanted to force it to a particular socket, whether I'd have to make the socket() call myself to get a valid TCP socket, then bind() it to a particular port, then call svcudp_create with that new socket descriptor, or am I going about it the hard way? -Brian