From owner-freebsd-questions Mon Apr 19 22:33: 3 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id C5C821534A for ; Mon, 19 Apr 1999 22:33:00 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id AAA24445; Tue, 20 Apr 1999 00:46:23 -0500 (EST) Date: Tue, 20 Apr 1999 00:46:22 -0500 (EST) From: Alfred Perlstein To: Doug Poland Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Finding an open port for Sybase In-Reply-To: <001001be8adf$c3aede70$de6f6478@egypt> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 19 Apr 1999, Doug Poland wrote: > Greetings, > > I'm trying to install Sybase Adaptive Server (for linux) on > -RELEASE 3.1. The install docs want me to include an open > port address. The docs say use netstat to find an open port. > > Their default port address is 7100. I can't seem to get netstat > to return addresses in this form. Any suggestions? > > BTW: Has anyone has successfully installed Sybase on FreeBSD? I think you can safely use the default port number, but let me explain netstat a bit: netstat shows you the resources in use, not the free ones... /usr/src/sys/i386/conf % netstat -a -f inet Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp 0 0 thumper.1027 freefall.FreeBSD.http CLOSE_WAIT tcp 0 0 thumper.1026 freefall.FreeBSD.http CLOSE_WAIT tcp 0 0 thumper.1025 freefall.FreeBSD.http CLOSE_WAIT tcp 0 0 thumper.1024 freefall.FreeBSD.http CLOSE_WAIT tcp 0 0 *.6000 *.* LISTEN tcp 0 0 *.ssh *.* LISTEN tcp 0 0 *.http *.* LISTEN ..... the first 4 lines where the (state) column is "CLOSE_WAIT" are active connections that are waiting to be closed. more interesting are the 3 lines following: tcp 0 0 *.6000 *.* LISTEN tcp 0 0 *.ssh *.* LISTEN tcp 0 0 *.http *.* LISTEN these are listening sockets, programs are listening on these ports for connections, the ports are 6000, ssh and httpd. you can lookup the port numbers in /etc/services: 6000 = 6000 (that's my X server) /usr/src/sys/i386/conf % grep ssh /etc/services ssh 22/tcp #Secure Shell Login ssh 22/udp #Secure Shell Login /usr/src/sys/i386/conf % grep http /etc/services # http://www.isi.edu/in-notes/iana/assignments/port-numbers http 80/tcp www www-http #World Wide Web HTTP http 80/udp www www-http #World Wide Web HTTP .... ok, so ports in use are 6000, 22 and 80 (i have more but i trimmed it just to show you) you can also try "netstat -an -f inet" which will directly show you the port numbers in use. i'm pretty sure you can assume anything not output by netstat means that it's free... hope this helps. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message