Updates for telnet protocol calls
This commit is contained in:
parent
54d9afdd17
commit
681d869b17
18
ChangeLog
18
ChangeLog
@ -12,18 +12,16 @@ v0.39.2 21-Nov-2003
|
||||
package incoming telnet sessions are now supported.
|
||||
Outgoing telnet finally works.
|
||||
|
||||
upgrade:
|
||||
See mbtelnetd.html how to install mbtelnetd.
|
||||
|
||||
common.a:
|
||||
A small fix in printable log function.
|
||||
Added a safety check for the TCP registrate function to prevent
|
||||
stale TCP/IP mailer counts.
|
||||
|
||||
mbcico:
|
||||
If called by inetd with the -t itn parameters, mbcico aborts
|
||||
and writes a short instruction in the log to install mbtelnetd.
|
||||
Outgoing telnet works.
|
||||
All internal references to tfido port changed to telnet port
|
||||
because we now default to telnet port 23 for ITN calls.
|
||||
Made outgoing telnet calls working with the help of sources
|
||||
from other open source projects.
|
||||
|
||||
mbtelnetd:
|
||||
New program, a proxy to handle incoming telnet/vmodem sessions.
|
||||
@ -31,11 +29,11 @@ v0.39.2 21-Nov-2003
|
||||
Vadim Kurland, vadim@gu.kiev.ua and Vadim Zaliva,
|
||||
lord@crocodile.kiev.ua.
|
||||
|
||||
SETUP.sh:
|
||||
Added installation of mbtelnetd for new systems.
|
||||
mbtask:
|
||||
Restored ITN protocol.
|
||||
|
||||
html:
|
||||
Added mbtelnetd page.
|
||||
SETUP.sh:
|
||||
Added installation of mailer telnet answer back for port 60177.
|
||||
|
||||
examples:
|
||||
Updated file menus, added View File command.
|
||||
|
7
SETUP.sh
7
SETUP.sh
@ -415,7 +415,7 @@ if [ "$FIDO" = "TRUE" ] || [ "$BINKD" = "TRUE" ]; then
|
||||
fi
|
||||
if [ "$FIDO" = "TRUE" ]; then
|
||||
echo -n ", fido at ports 60177, 60179"
|
||||
echo "tfido 60177/tcp # mbtelnetd ITN proxy">>/etc/services
|
||||
echo "tfido 60177/tcp # mbcico ITN mode (alternate port)">>/etc/services
|
||||
echo "fido 60179/tcp # mbcico IFC mode">>/etc/services
|
||||
fi
|
||||
chmod 644 /etc/services
|
||||
@ -435,7 +435,7 @@ cat << EOF >>/etc/inetd.conf
|
||||
#:MBSE-BBS: bbs service
|
||||
binkp stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ibn
|
||||
fido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ifc
|
||||
tfido stream tcp nowait mbse $MHOME/bin/mbtelnetd mbtelnetd
|
||||
tfido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t itn
|
||||
|
||||
EOF
|
||||
chmod 644 /etc/inetd.conf
|
||||
@ -493,7 +493,8 @@ service tfido
|
||||
wait = no
|
||||
user = mbse
|
||||
instances = 10
|
||||
server = $MHOME/bin/mbtelnetd
|
||||
server = $MHOME/bin/mbcico
|
||||
server_args = -t itn
|
||||
}
|
||||
EOF
|
||||
|
||||
|
@ -65,7 +65,7 @@ H_PROGS = programs/mbfido.html programs/mbmon.html \
|
||||
programs/mbaff.html programs/mbdiff.html \
|
||||
programs/mbindex.html programs/mbout.html \
|
||||
programs/mbsetup.html programs/mbuseradd.html \
|
||||
programs/mball.html programs/mbtelnetd.html \
|
||||
programs/mball.html \
|
||||
programs/mblang.html programs/mbsebbs.html \
|
||||
programs/mbstat.html programs/mbpasswd.html \
|
||||
programs/mbtask.html
|
||||
|
@ -14,7 +14,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<div align=right><h5>Last update 22-Nov-2003</h5></div>
|
||||
<div align=right><h5>Last update 25-Nov-2003</h5></div>
|
||||
<div align=center><h1>MBSE BBS Programs.</h1></div>
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
<li><A HREF="mbseq.html">mbseq, Sequence number creator</A>
|
||||
<li><A HREF="mbsetup.html">mbsetup, The setup program</A>
|
||||
<li><A HREF="mbstat.html">mbstat, The bbs status change program</A>
|
||||
<li><A HREF="mbtelnetd.html">mbtelnetd, The incoming telnet proxy</A>
|
||||
<li><A HREF="mbtoberep.html">mbtoberep, The toberep.data lister</A>
|
||||
<li><A HREF="mbuser.html">mbuser, The userbase maintenance program</A>
|
||||
<li><A HREF="mbuseradd.html">mbuseradd, The adduser wrapper</A>
|
||||
|
@ -1,69 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<!-- $Id$ -->
|
||||
<HEAD>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<META http-equiv="Content-Style-Type" content="text/css">
|
||||
<META NAME="Language" content='en'>
|
||||
<META name="author" lang="en" content="Michiel Broek">
|
||||
<META name="copyright" lang="en" content="Copyright Michiel Broek">
|
||||
<META name="description" lang="en" content="MBSE BBS Manual">
|
||||
<META name="keywords" lang="en" content="MBSE BBS, MBSE, BBS, manual, fido, fidonet, gateway, tosser, mail, tic, mailer">
|
||||
<TITLE>MBSE BBS Programs - mbtelnetd - Incoming telnet proxy.</TITLE>
|
||||
<LINK rel=stylesheet HREF="../manual.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<div align="right"><h5>Last update 22-Nov-2003</h5></div>
|
||||
<div align="center"><H1>mbtelnetd - Incoming telnet proxy</H1></div>
|
||||
|
||||
<H3>Synopsis.</H3>
|
||||
<P>
|
||||
<code><strong>mbtelnetd</strong></code>
|
||||
<P> <P>
|
||||
|
||||
<H3>Description.</H3>
|
||||
<P>
|
||||
<strong>mbtelnetd</strong> is a small proxy that handles incoming telnet/vmodem
|
||||
sessions and calls mbcico via the network on the standard fido port (60179).
|
||||
This small proxy was original written by Vadim Zaliva, lord@crocodile.kiev.ua, Serge
|
||||
Terekhov, 2:5000/13@fidonet and Vadim Kurland, vadim@gu.kiev.ua for the ifmail
|
||||
package.
|
||||
<P>
|
||||
<P> <P>
|
||||
|
||||
<H3>Installation</H3>
|
||||
<P>
|
||||
To accept incoming telnet sessions to allow the ITN nodelist flag you must
|
||||
install <b>mbtelnetd</b> in your system. You need to do this as root. The
|
||||
example shown is for most GNU/Linux distributions.
|
||||
Add the following line to <code>/etc/services</code>:
|
||||
<pre>
|
||||
tfido 60177/tcp
|
||||
</pre>
|
||||
Add the following line to <code>/etc/inetd.conf</code>:
|
||||
<pre>
|
||||
tfido stream tcp nowait mbse /opt/mbse/bin/mbtelnetd mbtelnetd
|
||||
</pre>
|
||||
Or add the following lines to <code>/etc/xinetd.d/mbsebbs</code> if your system
|
||||
uses xinetd instead of inetd:
|
||||
<pre>
|
||||
service tfido
|
||||
{
|
||||
socket_type = stream
|
||||
protocol = tcp
|
||||
wait = no
|
||||
user = mbse
|
||||
instances = 10
|
||||
server = /opt/mbse/bin/mbtelnetd
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
|
||||
<A HREF="index.htm"><IMG SRC="../images/larrow.png" ALT="Index" Border="0">Back to index</A>
|
||||
<A HREF="../index.htm"><IMG SRC="../images/b_arrow.png" ALT="Main" Border="0">Back to Main index</A>
|
||||
</BLOCKQUOTE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@ -176,11 +176,9 @@ int call(faddr *addr)
|
||||
tcp_mode = TCPMODE_IBN;
|
||||
} else if (strcmp(protocol, "fido") == 0) {
|
||||
tcp_mode = TCPMODE_IFC;
|
||||
#ifdef USE_TELNET
|
||||
} else if (strcmp(protocol, "telnet") == 0) {
|
||||
tcp_mode = TCPMODE_ITN;
|
||||
telnet = TRUE;
|
||||
#endif
|
||||
} else {
|
||||
Syslog('+', "No common TCP/IP protocols for node %s", nlent->name);
|
||||
free(inetaddr);
|
||||
|
@ -83,19 +83,12 @@ void usage(void)
|
||||
{
|
||||
fprintf(stderr,"ifcico; (c) Eugene G. Crosser, 1993-1997\n");
|
||||
fprintf(stderr,"mbcico ver. %s; (c) %s\n\n", VERSION, SHORTRIGHT);
|
||||
fprintf(stderr,"-a<inetaddr> <node>\n");
|
||||
fprintf(stderr,"-n<phone> forced phone number\n");
|
||||
fprintf(stderr,"-l<ttydevice> forced tty device\n");
|
||||
#ifdef USE_TELNET
|
||||
fprintf(stderr,"-t<tcpmode> must be one of ifc|itn|ibn, forces TCP/IP\n");
|
||||
#else
|
||||
fprintf(stderr,"-t<tcpmode> must be one of ifc|ibn, forces TCP/IP\n");
|
||||
#endif
|
||||
fprintf(stderr,"-a<inetaddr> supply internet hostname if not in nodelist\n");
|
||||
fprintf(stderr," <node> should be in domain form, e.g. f11.n22.z3\n");
|
||||
fprintf(stderr," (this implies master mode)\n");
|
||||
fprintf(stderr,"\n or: %s tsync|yoohoo|**EMSI_INQC816|-t ibn|-t ifc\n",myname);
|
||||
fprintf(stderr," (this implies slave mode)\n");
|
||||
fprintf(stderr,"mbcico [-a inetaddr[:port]] [-n phone] [-l tty] [-t ibn|-t ifc|-t itn] node\n");
|
||||
fprintf(stderr,"node should be in domain form, e.g. f11.n22.z3\n");
|
||||
fprintf(stderr," (this implies master mode)\n");
|
||||
fprintf(stderr," or:\n");
|
||||
fprintf(stderr,"mbcico tsync|yoohoo|**EMSI_INQC816|-t ibn|-t ifc|-t itn\n");
|
||||
fprintf(stderr," (this implies slave mode)\n");
|
||||
}
|
||||
|
||||
|
||||
@ -253,7 +246,7 @@ int main(int argc, char *argv[])
|
||||
protocol = xstrcpy((char *)"binkp");
|
||||
} else if (strncmp(p, "itn", 3) == 0) {
|
||||
tcp_mode = TCPMODE_ITN;
|
||||
protocol = xstrcpy((char *)"tfido");
|
||||
protocol = xstrcpy((char *)"telnet");
|
||||
telnet = TRUE;
|
||||
} else {
|
||||
usage();
|
||||
|
@ -103,13 +103,11 @@ int opentcp(char *name)
|
||||
else
|
||||
server.sin_port = htons(FIDOPORT);
|
||||
break;
|
||||
#ifdef USE_TELNET
|
||||
case TCPMODE_ITN: if ((se = getservbyname("tfido", "tcp")))
|
||||
case TCPMODE_ITN: if ((se = getservbyname("telnet", "tcp")))
|
||||
server.sin_port = se->s_port;
|
||||
else
|
||||
server.sin_port = htons(TELNPORT);
|
||||
break;
|
||||
#endif
|
||||
case TCPMODE_IBN: if ((se = getservbyname("binkd", "tcp")))
|
||||
server.sin_port = se->s_port;
|
||||
else
|
||||
|
@ -52,9 +52,7 @@
|
||||
|
||||
|
||||
extern int tcp_mode;
|
||||
#ifdef USE_TELNET
|
||||
extern int telnet;
|
||||
#endif
|
||||
|
||||
|
||||
node *nlent;
|
||||
@ -104,11 +102,9 @@ int session(faddr *a, node *nl, int role, int tp, char *dt)
|
||||
} else if (tcp_mode == TCPMODE_IFC) {
|
||||
Syslog('+', "Incoming IFC/TCP connection from %s", inet_ntoa(peeraddr.sin_addr));
|
||||
IsDoing("Incoming IFC/TCP");
|
||||
#ifdef USE_TELNET
|
||||
} else if (tcp_mode == TCPMODE_ITN) {
|
||||
Syslog('+', "Incoming ITN/TCP connection from %s", inet_ntoa(peeraddr.sin_addr));
|
||||
IsDoing("Incoming ITN/TCP");
|
||||
#endif
|
||||
} else if (tcp_mode == TCPMODE_NONE) {
|
||||
WriteError("Unknown TCP connection, parameter missing");
|
||||
die(MBERR_COMMANDLINE);
|
||||
@ -116,10 +112,8 @@ int session(faddr *a, node *nl, int role, int tp, char *dt)
|
||||
}
|
||||
session_flags |= SESSION_TCP;
|
||||
}
|
||||
#ifdef USE_TELNET
|
||||
if (telnet && (session_flags & SESSION_TCP))
|
||||
telnet_init();
|
||||
#endif
|
||||
|
||||
if (data)
|
||||
free(data);
|
||||
|
@ -212,10 +212,8 @@ int outstat()
|
||||
ibnmask = (*tmpm)->mask;
|
||||
if (strcmp((*tmpm)->name, "IFC") == 0)
|
||||
ifcmask = (*tmpm)->mask;
|
||||
#ifdef USE_TELNET
|
||||
if (strcmp((*tmpm)->name, "ITN") == 0)
|
||||
itnmask = (*tmpm)->mask;
|
||||
#endif
|
||||
}
|
||||
now = time(NULL);
|
||||
tm = gmtime(&now); /* UTC time */
|
||||
@ -422,11 +420,7 @@ int outstat()
|
||||
*/
|
||||
if (TCFG.max_tcp && (tmp->olflags & cmmask) &&
|
||||
(((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) &&
|
||||
#ifdef USE_TELNET
|
||||
((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
||||
#else
|
||||
((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask))) {
|
||||
#endif
|
||||
tmp->flavors |= F_CALL;
|
||||
}
|
||||
|
||||
@ -505,11 +499,7 @@ int outstat()
|
||||
if ((tmp->flavors) & F_CALL) {
|
||||
tmp->callmode = CM_NONE;
|
||||
|
||||
#ifdef USE_TELNET
|
||||
if (TCFG.max_tcp && ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
||||
#else
|
||||
if (TCFG.max_tcp && ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask))) {
|
||||
#endif
|
||||
inet_calls++;
|
||||
tmp->callmode = CM_INET;
|
||||
}
|
||||
|
Reference in New Issue
Block a user