201 lines
8.2 KiB
HTML
201 lines
8.2 KiB
HTML
<!--startcut ======================================================= -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<META NAME="generator" CONTENT="lgazmail v1.2N.d">
|
|
<TITLE>The Answer Guy 46: TCPMux Revisited: You'll need a Daemon for it, or a Better inetd</TITLE>
|
|
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
|
|
LINK="#3366FF" VLINK="#A000A0">
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<center>
|
|
<H1><A NAME="answer">
|
|
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
|
|
border="0" align="middle">
|
|
<font color="#B03060">The Answer Guy</font>
|
|
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
|
|
border="0" align="middle">
|
|
</A></H1>
|
|
<BR>
|
|
<H4>By James T. Dennis,
|
|
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
|
|
LinuxCare,
|
|
<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
|
|
</H4>
|
|
</center>
|
|
|
|
<p><hr><p>
|
|
<!-- endcut ======================================================= -->
|
|
<!-- begin 3 -->
|
|
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
|
|
height="50" width="60" alt="(?) " border="0"
|
|
>TCPMux Revisited: You'll need a Daemon for it, or a Better inetd</H3>
|
|
|
|
|
|
<p><strong>From Helpdesk on Wed, 01 Sep 1999
|
|
</strong></p>
|
|
<!-- ::
|
|
TCPMux Revisited: You'll need a Daemon for it, or a Better inetd
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
:: -->
|
|
<P><STRONG>
|
|
I was trying to configure a few services using the tcpmux - inetd
|
|
internal service. but while trying to connect to tcpmux on port 1
|
|
it gives me an i/o error on socket and fails to establish a
|
|
connection.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
could you please elaborate on this.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
i was also hunting to find some info on tcpmux but was not able to.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Pleaseeeeeeeeeeeeeeeeeeeeeeeee help. doing some serious bussiness
|
|
programming on linux. stuck up.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
jaggu
|
|
</STRONG></P>
|
|
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
The default '<tt>inetd</tt>' that ships with most Linux distributions
|
|
doesn't support the tcpmux protocol. You'd either need to get a
|
|
replacement Internet Dispatch Daemon (like Mike Neuman's BINETD,
|
|
"Better INETD" at: <A HREF="http://www.engarde.com/~mcn/binetd/index.htm"
|
|
>http://www.engarde.com/~mcn/binetd/index.htm</A>),
|
|
or you'd need to write a standalong tcpmuxd and configure your
|
|
'<tt>inetd</tt>' to launch it for new connections on TCP port 1.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
I also found a web page that suggests that some versions of BSD
|
|
4.4 inetd include support for TCPMux services:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><DL><DT>
|
|
Manpage of INETD
|
|
<DD><A HREF="http://theoryx5.uwinnipeg.ca/gnu/inetutils/inetd.8.html"
|
|
>http://theoryx5.uwinnipeg.ca/gnu/inetutils/inetd.8.html</A>
|
|
</DL></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
This impression seems to be supported by the online man pages at
|
|
the <A HREF="http://www.freebsd.org/">FreeBSD</A> web site:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><DL><DT>
|
|
FreeBSD Hypertext Man Pages: inetd
|
|
<DD><A HREF="http://www.freebsd.org/cgi/man.cgi?query=inetd&apropos=0&sektion=0&manpath=FreeBSD+4.0-current&format=html"
|
|
>http://www.freebsd.org/cgi/man.cgi?query=inetd&apropos=0&sektion=0&manpath=FreeBSD+4.0-current&format=html</A>
|
|
</DL></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
So perhaps you could (re-)port that to Linux. Or, perhaps you
|
|
could write a standalone daemon to implement the protocol. All
|
|
it would do is a simple handshake and launch.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Presumably your tcpmuxd daemon would (if you wrote it) use a
|
|
separate configuration file (maybe <TT>/etc/tcpmux.conf</TT> would be a
|
|
good name) which would tell it which services were available
|
|
(names with the custom protocol versions encoded into them
|
|
perhaps) and what programs to launch to handle requests for each
|
|
of those protocols/services. Obviously this would be serving a
|
|
very similar function to the existing inetd.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
If you were going to write such a daemon, it seems like it would
|
|
make sense to derive it from TCP Wrappers. tcpd performs very
|
|
similar operations, and you could link the tcpmuxd against
|
|
libwrap so that its services could be subjected to the same
|
|
access controls and logging that TCP Wrappers provides, while
|
|
allowing the administrator to continue using just the
|
|
<TT>/etc/hosts.allow</TT> and <TT>/etc/hosts.deny</TT> files for those controls.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
The TCPMux protocol is described in RFC1078. There are a number
|
|
of archives of RFCs on the 'net. Any could search engine should
|
|
find them (start with the search engine at Linux Gazette's site
|
|
since I know I've provided links to a couple of them in my past
|
|
columns).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Here's one description of this protocol with some notes about
|
|
where it's supported:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BlockQuote>
|
|
<A HREF="http://www.con.wesleyan.edu/~triemer/network/tcpmux/tcpmux.html"
|
|
>http://www.con.wesleyan.edu/~triemer/network/tcpmux/tcpmux.html</A>
|
|
</BlockQuote></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
I've suggested this project to a few open source programmers,
|
|
but none have stepped upto the plate. Perhaps you could do it.
|
|
Once a good implementation is available, we could encourage
|
|
distribution maintainers to include it and programmers to use it
|
|
rather than grabbing new ports and perpetuating the problems of
|
|
"WKS" (well-known service port numbering).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
I'd particularly like to see '<tt>mcserv</tt>' (the Midnight Commander
|
|
communications service) and AMANDA (the "Advanced Maryland
|
|
Network Disk Archiver") use this for their networking protocols.
|
|
Those or such specialized protocols that they should use TCPMux
|
|
rather than grabbing a port number for a protocol which will
|
|
never be implemented in any other clients or servers.
|
|
</BLOCKQUOTE>
|
|
<!-- sig -->
|
|
|
|
<!-- end 3 -->
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr> <P>
|
|
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
|
|
>Copyright ©</a> 1999, James T. Dennis
|
|
<BR>Published in <I>The Linux Gazette</I> Issue 46 October 1999</H5>
|
|
<H6 ALIGN="center">HTML transformation by
|
|
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
|
|
Starshine Technical Services,
|
|
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H6>
|
|
<P> <hr> <P>
|
|
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<TABLE WIDTH="96%"><TR VALIGN="center" ALIGN="center">
|
|
<TD colspan="2" align="left"><A
|
|
HREF="../lg_answer46.html"
|
|
><IMG SRC="../../gx/dennis/answernew.gif"
|
|
ALT="[ Answer Guy Current Index ]"></A></td>
|
|
<TD WIDTH="12%"><A HREF="1.html">1</A></TD>
|
|
<TD WIDTH="12%"><A HREF="2.html">2</A></TD>
|
|
<TD WIDTH="12%"><A HREF="3.html">3</A></TD>
|
|
<TD WIDTH="12%"><A HREF="4.html">5</A></TD>
|
|
<TD WIDTH="12%"><A HREF="5.html">5</A></TD>
|
|
<TD WIDTH="12%"><A HREF="6.html">6</A></TD>
|
|
</TR><TR VALIGN="center" ALIGN="center">
|
|
<TD WIDTH="12%"><A HREF="7.html">7</A></TD>
|
|
<TD WIDTH="12%"><A HREF="8.html">8</A></TD>
|
|
<TD WIDTH="12%"><A HREF="9.html">9</A></TD>
|
|
<TD WIDTH="12%"><A HREF="10.html">10</A></TD>
|
|
<TD WIDTH="12%"><A HREF="11.html">11</A></TD>
|
|
<TD WIDTH="12%"><A HREF="12.html">12</A></TD>
|
|
<TD align="right" colspan="2"><A
|
|
HREF="../../tag/kb.html"
|
|
><IMG SRC="../../gx/dennis/answertoc.gif"
|
|
ALT="[ Index of Past Answers ]"></A></td>
|
|
</TR></TABLE>
|
|
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<P> <hr> <P>
|
|
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<A HREF="../index.html"
|
|
><IMG SRC="../../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
|
|
<A HREF="/index.html"
|
|
><IMG SRC="../../gx/homenew.gif" ALT="[ Front Page ]"></A>
|
|
<A HREF="../lg_bytes46.html"
|
|
><IMG SRC="../../gx/back2.gif" ALT="[ Previous Section ]"></A>
|
|
<A HREF="../../faq/index.html"
|
|
><IMG SRC="../../gx/dennis/faq.gif"
|
|
ALT="[ Linux Gazette FAQ ]"></A>
|
|
<A HREF="../lg_tips46.html"
|
|
><IMG SRC="../../gx/fwd.gif" ALT="[ Next Section ]"></A>
|
|
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
</BODY></HTML>
|
|
<!--endcut ========================================================= -->
|