Define "open up a port". If you want to attach a program to that port,
the easiest way to do it is a pretty bad hack to telnetd. To do this,
just add an entry to /etc/services like...
service_name port_num/protocol description #comment
for example
blah 3000/tcp blah #my crazy hack of inetd
then in /etc/inetd.conf...
blah stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd -L
/path/to/your/program
You can change the 'root' if you want it run as a different user. Read
the man page on in.telnetd for a description of the -L.
If you want to bind a tcp socket to a port from a program of some kind,
then go buy a $60 network programming book.
-CJO-
On Thu, 17 Jun 1999, Robert Johannes wrote:
>Hi All,
>I'm wondering how one opens up a port on a linux or solaris machine.
>
>E.g; I'm trying to open up port 3000 on both a linux and a solaris
>machine. What do I need to do? Do I have tweak with the inetd.conf and
>/etc/services files?
>
>Any help very much appreciated.
>
>robert
>
>
C.J. Oster (Linux Guru/Surge Addict)
------------------------------------------------------------------
| [EMAIL PROTECTED] | 1003 S. 1st St. | CCSO, WSG, UIUC |
| [EMAIL PROTECTED] | Champaign, IL 61820 | L538 DCL, Urbana |
| ---------------------------------------------------------------|
| PGP: 87D5 4216 43A1 42D6 754D 8F5E 24B3 992A B7A1 F556 |
------------------------------------------------------------------
(580)761-6393 (217)328-8934
"Linux, for people with an IQ above 98" - Bumper Sticker
"Hm, a little big for a cup holder... Why does it say '4x' on it?"