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.
|
package incoming telnet sessions are now supported.
|
||||||
Outgoing telnet finally works.
|
Outgoing telnet finally works.
|
||||||
|
|
||||||
upgrade:
|
|
||||||
See mbtelnetd.html how to install mbtelnetd.
|
|
||||||
|
|
||||||
common.a:
|
common.a:
|
||||||
A small fix in printable log function.
|
A small fix in printable log function.
|
||||||
Added a safety check for the TCP registrate function to prevent
|
Added a safety check for the TCP registrate function to prevent
|
||||||
stale TCP/IP mailer counts.
|
stale TCP/IP mailer counts.
|
||||||
|
|
||||||
mbcico:
|
mbcico:
|
||||||
If called by inetd with the -t itn parameters, mbcico aborts
|
All internal references to tfido port changed to telnet port
|
||||||
and writes a short instruction in the log to install mbtelnetd.
|
because we now default to telnet port 23 for ITN calls.
|
||||||
Outgoing telnet works.
|
Made outgoing telnet calls working with the help of sources
|
||||||
|
from other open source projects.
|
||||||
|
|
||||||
mbtelnetd:
|
mbtelnetd:
|
||||||
New program, a proxy to handle incoming telnet/vmodem sessions.
|
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,
|
Vadim Kurland, vadim@gu.kiev.ua and Vadim Zaliva,
|
||||||
lord@crocodile.kiev.ua.
|
lord@crocodile.kiev.ua.
|
||||||
|
|
||||||
SETUP.sh:
|
mbtask:
|
||||||
Added installation of mbtelnetd for new systems.
|
Restored ITN protocol.
|
||||||
|
|
||||||
html:
|
SETUP.sh:
|
||||||
Added mbtelnetd page.
|
Added installation of mailer telnet answer back for port 60177.
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
Updated file menus, added View File command.
|
Updated file menus, added View File command.
|
||||||
|
7
SETUP.sh
7
SETUP.sh
@ -415,7 +415,7 @@ if [ "$FIDO" = "TRUE" ] || [ "$BINKD" = "TRUE" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ "$FIDO" = "TRUE" ]; then
|
if [ "$FIDO" = "TRUE" ]; then
|
||||||
echo -n ", fido at ports 60177, 60179"
|
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
|
echo "fido 60179/tcp # mbcico IFC mode">>/etc/services
|
||||||
fi
|
fi
|
||||||
chmod 644 /etc/services
|
chmod 644 /etc/services
|
||||||
@ -435,7 +435,7 @@ cat << EOF >>/etc/inetd.conf
|
|||||||
#:MBSE-BBS: bbs service
|
#:MBSE-BBS: bbs service
|
||||||
binkp stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ibn
|
binkp stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ibn
|
||||||
fido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ifc
|
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
|
EOF
|
||||||
chmod 644 /etc/inetd.conf
|
chmod 644 /etc/inetd.conf
|
||||||
@ -493,7 +493,8 @@ service tfido
|
|||||||
wait = no
|
wait = no
|
||||||
user = mbse
|
user = mbse
|
||||||
instances = 10
|
instances = 10
|
||||||
server = $MHOME/bin/mbtelnetd
|
server = $MHOME/bin/mbcico
|
||||||
|
server_args = -t itn
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ H_PROGS = programs/mbfido.html programs/mbmon.html \
|
|||||||
programs/mbaff.html programs/mbdiff.html \
|
programs/mbaff.html programs/mbdiff.html \
|
||||||
programs/mbindex.html programs/mbout.html \
|
programs/mbindex.html programs/mbout.html \
|
||||||
programs/mbsetup.html programs/mbuseradd.html \
|
programs/mbsetup.html programs/mbuseradd.html \
|
||||||
programs/mball.html programs/mbtelnetd.html \
|
programs/mball.html \
|
||||||
programs/mblang.html programs/mbsebbs.html \
|
programs/mblang.html programs/mbsebbs.html \
|
||||||
programs/mbstat.html programs/mbpasswd.html \
|
programs/mbstat.html programs/mbpasswd.html \
|
||||||
programs/mbtask.html
|
programs/mbtask.html
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
<BLOCKQUOTE>
|
<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>
|
<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="mbseq.html">mbseq, Sequence number creator</A>
|
||||||
<li><A HREF="mbsetup.html">mbsetup, The setup program</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="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="mbtoberep.html">mbtoberep, The toberep.data lister</A>
|
||||||
<li><A HREF="mbuser.html">mbuser, The userbase maintenance program</A>
|
<li><A HREF="mbuser.html">mbuser, The userbase maintenance program</A>
|
||||||
<li><A HREF="mbuseradd.html">mbuseradd, The adduser wrapper</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;
|
tcp_mode = TCPMODE_IBN;
|
||||||
} else if (strcmp(protocol, "fido") == 0) {
|
} else if (strcmp(protocol, "fido") == 0) {
|
||||||
tcp_mode = TCPMODE_IFC;
|
tcp_mode = TCPMODE_IFC;
|
||||||
#ifdef USE_TELNET
|
|
||||||
} else if (strcmp(protocol, "telnet") == 0) {
|
} else if (strcmp(protocol, "telnet") == 0) {
|
||||||
tcp_mode = TCPMODE_ITN;
|
tcp_mode = TCPMODE_ITN;
|
||||||
telnet = TRUE;
|
telnet = TRUE;
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
Syslog('+', "No common TCP/IP protocols for node %s", nlent->name);
|
Syslog('+', "No common TCP/IP protocols for node %s", nlent->name);
|
||||||
free(inetaddr);
|
free(inetaddr);
|
||||||
|
@ -83,19 +83,12 @@ void usage(void)
|
|||||||
{
|
{
|
||||||
fprintf(stderr,"ifcico; (c) Eugene G. Crosser, 1993-1997\n");
|
fprintf(stderr,"ifcico; (c) Eugene G. Crosser, 1993-1997\n");
|
||||||
fprintf(stderr,"mbcico ver. %s; (c) %s\n\n", VERSION, SHORTRIGHT);
|
fprintf(stderr,"mbcico ver. %s; (c) %s\n\n", VERSION, SHORTRIGHT);
|
||||||
fprintf(stderr,"-a<inetaddr> <node>\n");
|
fprintf(stderr,"mbcico [-a inetaddr[:port]] [-n phone] [-l tty] [-t ibn|-t ifc|-t itn] node\n");
|
||||||
fprintf(stderr,"-n<phone> forced phone number\n");
|
fprintf(stderr,"node should be in domain form, e.g. f11.n22.z3\n");
|
||||||
fprintf(stderr,"-l<ttydevice> forced tty device\n");
|
fprintf(stderr," (this implies master mode)\n");
|
||||||
#ifdef USE_TELNET
|
fprintf(stderr," or:\n");
|
||||||
fprintf(stderr,"-t<tcpmode> must be one of ifc|itn|ibn, forces TCP/IP\n");
|
fprintf(stderr,"mbcico tsync|yoohoo|**EMSI_INQC816|-t ibn|-t ifc|-t itn\n");
|
||||||
#else
|
fprintf(stderr," (this implies slave mode)\n");
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -253,7 +246,7 @@ int main(int argc, char *argv[])
|
|||||||
protocol = xstrcpy((char *)"binkp");
|
protocol = xstrcpy((char *)"binkp");
|
||||||
} else if (strncmp(p, "itn", 3) == 0) {
|
} else if (strncmp(p, "itn", 3) == 0) {
|
||||||
tcp_mode = TCPMODE_ITN;
|
tcp_mode = TCPMODE_ITN;
|
||||||
protocol = xstrcpy((char *)"tfido");
|
protocol = xstrcpy((char *)"telnet");
|
||||||
telnet = TRUE;
|
telnet = TRUE;
|
||||||
} else {
|
} else {
|
||||||
usage();
|
usage();
|
||||||
|
@ -103,13 +103,11 @@ int opentcp(char *name)
|
|||||||
else
|
else
|
||||||
server.sin_port = htons(FIDOPORT);
|
server.sin_port = htons(FIDOPORT);
|
||||||
break;
|
break;
|
||||||
#ifdef USE_TELNET
|
case TCPMODE_ITN: if ((se = getservbyname("telnet", "tcp")))
|
||||||
case TCPMODE_ITN: if ((se = getservbyname("tfido", "tcp")))
|
|
||||||
server.sin_port = se->s_port;
|
server.sin_port = se->s_port;
|
||||||
else
|
else
|
||||||
server.sin_port = htons(TELNPORT);
|
server.sin_port = htons(TELNPORT);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case TCPMODE_IBN: if ((se = getservbyname("binkd", "tcp")))
|
case TCPMODE_IBN: if ((se = getservbyname("binkd", "tcp")))
|
||||||
server.sin_port = se->s_port;
|
server.sin_port = se->s_port;
|
||||||
else
|
else
|
||||||
|
@ -52,9 +52,7 @@
|
|||||||
|
|
||||||
|
|
||||||
extern int tcp_mode;
|
extern int tcp_mode;
|
||||||
#ifdef USE_TELNET
|
|
||||||
extern int telnet;
|
extern int telnet;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
node *nlent;
|
node *nlent;
|
||||||
@ -104,11 +102,9 @@ int session(faddr *a, node *nl, int role, int tp, char *dt)
|
|||||||
} else if (tcp_mode == TCPMODE_IFC) {
|
} else if (tcp_mode == TCPMODE_IFC) {
|
||||||
Syslog('+', "Incoming IFC/TCP connection from %s", inet_ntoa(peeraddr.sin_addr));
|
Syslog('+', "Incoming IFC/TCP connection from %s", inet_ntoa(peeraddr.sin_addr));
|
||||||
IsDoing("Incoming IFC/TCP");
|
IsDoing("Incoming IFC/TCP");
|
||||||
#ifdef USE_TELNET
|
|
||||||
} else if (tcp_mode == TCPMODE_ITN) {
|
} else if (tcp_mode == TCPMODE_ITN) {
|
||||||
Syslog('+', "Incoming ITN/TCP connection from %s", inet_ntoa(peeraddr.sin_addr));
|
Syslog('+', "Incoming ITN/TCP connection from %s", inet_ntoa(peeraddr.sin_addr));
|
||||||
IsDoing("Incoming ITN/TCP");
|
IsDoing("Incoming ITN/TCP");
|
||||||
#endif
|
|
||||||
} else if (tcp_mode == TCPMODE_NONE) {
|
} else if (tcp_mode == TCPMODE_NONE) {
|
||||||
WriteError("Unknown TCP connection, parameter missing");
|
WriteError("Unknown TCP connection, parameter missing");
|
||||||
die(MBERR_COMMANDLINE);
|
die(MBERR_COMMANDLINE);
|
||||||
@ -116,10 +112,8 @@ int session(faddr *a, node *nl, int role, int tp, char *dt)
|
|||||||
}
|
}
|
||||||
session_flags |= SESSION_TCP;
|
session_flags |= SESSION_TCP;
|
||||||
}
|
}
|
||||||
#ifdef USE_TELNET
|
|
||||||
if (telnet && (session_flags & SESSION_TCP))
|
if (telnet && (session_flags & SESSION_TCP))
|
||||||
telnet_init();
|
telnet_init();
|
||||||
#endif
|
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
free(data);
|
free(data);
|
||||||
|
@ -212,10 +212,8 @@ int outstat()
|
|||||||
ibnmask = (*tmpm)->mask;
|
ibnmask = (*tmpm)->mask;
|
||||||
if (strcmp((*tmpm)->name, "IFC") == 0)
|
if (strcmp((*tmpm)->name, "IFC") == 0)
|
||||||
ifcmask = (*tmpm)->mask;
|
ifcmask = (*tmpm)->mask;
|
||||||
#ifdef USE_TELNET
|
|
||||||
if (strcmp((*tmpm)->name, "ITN") == 0)
|
if (strcmp((*tmpm)->name, "ITN") == 0)
|
||||||
itnmask = (*tmpm)->mask;
|
itnmask = (*tmpm)->mask;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
tm = gmtime(&now); /* UTC time */
|
tm = gmtime(&now); /* UTC time */
|
||||||
@ -422,11 +420,7 @@ int outstat()
|
|||||||
*/
|
*/
|
||||||
if (TCFG.max_tcp && (tmp->olflags & cmmask) &&
|
if (TCFG.max_tcp && (tmp->olflags & cmmask) &&
|
||||||
(((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) &&
|
(((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) &&
|
||||||
#ifdef USE_TELNET
|
|
||||||
((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
||||||
#else
|
|
||||||
((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask))) {
|
|
||||||
#endif
|
|
||||||
tmp->flavors |= F_CALL;
|
tmp->flavors |= F_CALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,11 +499,7 @@ int outstat()
|
|||||||
if ((tmp->flavors) & F_CALL) {
|
if ((tmp->flavors) & F_CALL) {
|
||||||
tmp->callmode = CM_NONE;
|
tmp->callmode = CM_NONE;
|
||||||
|
|
||||||
#ifdef USE_TELNET
|
|
||||||
if (TCFG.max_tcp && ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
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++;
|
inet_calls++;
|
||||||
tmp->callmode = CM_INET;
|
tmp->callmode = CM_INET;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user