From:	ADVAX::"mcnc!VM1.NoDak.EDU!nieland_t%KAHUNA.ASD-YF.WPAFB.AF.MIL" 16-FEB-1991 05:29:04.73
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: NNTP with Multinet, access not working

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Sat, 16 Feb 91 05:28:23 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA15425 for ; Sat, 16 Feb 91 05:12:48 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA09788; Sat, 16 Feb 91 00:40:48 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9102160540.AA09788@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 9105; Fri, 15 Feb 91 23:40:06 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 4818; Fri, 15 Feb 91 23:40:05 CST
Date:         Fri, 15 Feb 91 17:52:45 GMT
Reply-To: mcnc!VM1.NoDak.EDU!nieland_t%KAHUNA.ASD-YF.WPAFB.AF.MIL
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mcnc!VM1.NoDak.EDU!nieland_t%KAHUNA.ASD-YF.WPAFB.AF.MIL
Subject:      Re: NNTP with Multinet, access not working
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <28561.27b91c69@kuhub.cc.ukans.edu>, sloane@kuhub.cc.ukans.edu writes
:
> In article <1991Feb12.174048.32@kahuna.asd-yf.wpafb.af.mil>,
>  nieland_t@kahuna.asd-yf.wpafb.af.mil writes:
>> Is there a definative version of NNTP (server) for Multinet.  The version
>> distributed  with ANU NEWS 6.0.1 doesn't do the best of jobs.  On one system
it
>> looks to be  working fine, but on another, however, it will only work with th
e
>> generic hostname "TCP" set up, which is a little to open for me.
>>
>> The following is a log from running NNTP_Client to the machine that is being
>> picky:
>>
        Material Deleted
 
> It seems to work just fine as long as the numeric address can be
> mapped back to a host name.  I made some changes in the getremhost
> routine in NNTP_TCPWINMULTINET.C to allow authorizing remote hosts by
> numeric address.  Change getremhost as follows:
>
>  if (remhost) {
>    namelen=sizeof(name);
>    getpeername(f_i,&name,&namelen);
>    hp = gethostbyaddr(&name.sa_data[2],4,AF_INET);
>    if (hp == NULL) {
>                                               /* fprintf and strcpy deleted */
>       sprintf (remhost,"%d.%d.%d.%d",                                  /*NEW*/
>                (name.sa_data[2]<0?name.sa_data[2]+256:name.sa_data[2]),/*NEW*/
>                (name.sa_data[3]<0?name.sa_data[3]+256:name.sa_data[3]),/*NEW*/
>                (name.sa_data[4]<0?name.sa_data[4]+256:name.sa_data[4]),/*NEW*/
>                (name.sa_data[5]<0?name.sa_data[5]+256:name.sa_data[5]) /*NEW*/
>               );                                                       /*NEW*/
>      }
>    else
>      strcpy(remhost,hp->h_name);
>    }
>
> There is probably some better way to get the numeric address, but the
> above seems to work.  It also has the advantage of logging the numeric
> address of people who try to access the server but get rejected.
> --
> USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
> E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444
 
The above worked excellantly for me.  Most of the other NNTP systems I
have seen already return the address if they can't get the name.
 
Unless there is a better solution, I would like to see the above be
put in the "master" version of nntp_tcpwinmultinet.c.
 
Ted Nieland                             nieland_t@kahuna.asd-yf.wpafb.af.mil
Control Data Corporation                nieland@dayfac.cdc.com
(513) 427-6355                          ted@nieland.dayton.oh.us
