🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
23 messages
23 total messages Started by Thomas R. Stevenson Tue, 28 May 1996 00:00
HELP: Can tcpwrapper be used to control access to INN?
#8012
Author: Thomas R. Stevenson
Date: Tue, 28 May 1996 00:00
54 lines
3601 bytes
We've been running INN version 1.4 for some time. We've been using
INN's nnrp.access file to control who has read/post access to out news
site, but would like to switch over to TCPWRAPPER if at all
possible. We've been using TCPWRAPPER for other services, and it would
be nice if we could control all services from one place. We've been
using TCPWRAPPER's "Easy configuration and installation", were by you
move the daemon's bin file into TCPWRAPPER's REAL_DAEMON_DIR
directory, and then move tcpd into the daemon's original bin file.

To test INN with TCPWRAPPER, we moved in.nnrpd into TCPWRAPPER's
REAL_DAEMON_DIR directory, and then move tcpd into the in.nnrpd. After
making this switch, we tried to make a connection to INN, but in each
case, the connection was just dropped. Just to eliminate some
potential TCPWRAPPER configuration problems, we setup the hosts.allow
and hosts.deny files such that ALL connections were valid, but this
didn't help. When we were done testing, we moved in.nnrpd from
TCPWRAPPER's REAL_DAEMON_DIR directory back to it's normal location,
and as soon as we did that, we were able to connect to INN again (so
the in.nnrpd in TCPWRAPPER's REAL_DAEMON_DIR directory was valid).

The write-up for TCPWRAPPER says that it only works for daemons that
are started on demand by inetd, or some other automatic startup
program. Given that in.nnrpd is started on demand by INN, we were
hoping that this would be sufficient to allow us to use TCPWRAPPER
with INN.

The write-up for INN says to not include any entries for INN in the
inetd.conf file, so we didn't do so before testing TCPWRAPPER with
INN.

Has anyone else found a way of using TCPWRAPPER to control access to
INN? If so, what changes were necessary to get this working? 

If at all possible, please reply to tom@tom.cc.wayne.edu. Thanks!

--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8022
Author: Dave Barr
Date: Tue, 28 May 1996 00:00
18 lines
1259 bytes
In article <4oforl$ghq@cwis-20.wayne.edu>,
Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:
>We've been running INN version 1.4 for some time. We've been using
>INN's nnrp.access file to control who has read/post access to out news
>site, but would like to switch over to TCPWRAPPER if at all
>possible. We've been using TCPWRAPPER for other services, and it would
>be nice if we could control all services from one place.

Sorry, can't be done.

You're better off modifying INN to use tcp_wrapper's library access routines.
tcp_wrapper's not designed to provide access control to long-running daemons.
See the tcp_wrapper docs for more info.

--Dave

Re: HELP: Can tcpwrapper be used to control access to INN?
#8045
Author: Thomas R. Stevenson
Date: Wed, 29 May 1996 00:00
56 lines
2399 bytes
Scott Hazen Mueller (scott@zorch.sf-bay.org) wrote:
> In article <4og9pc$49e@augusta.math.psu.edu>, barr@math.psu.edu (Dave Barr) writes:
> >Sorry, can't be done.

> Strikes me, from his original posting, that he's putting tcpd where
> in.nnrpd usually sits.  It's not obvious to me why that doesn't
> work.  In other words, he's not wrapping innd.

Correct. In fact, I just received the following message from Wietse
Venema <wietse@wzv.win.tue.nl>:


Looks like you found a bug in tcpd. When it is installed as in.nnrpd,
it looks like inn calls it with an absolute path. In that case, tcpd
ignores REAL_DAEMON_DIR:

    /*
     * If argv[0] is an absolute path name, ignore REAL_DAEMON_DIR, and strip
     * argv[0] to its basename.
     */

You'll have to do something like: strip absolute path and force it to
prepend REAL_DAEMON_DIR regardless, like this:

    if (argv[0][0] == '/') {
        strcpy(path, argv[0]);
        argv[0] = strrchr(argv[0], '/') + 1;
    }
    sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]);

This could explain why your attempt did not succeed (you would
have an infinite loop where tcpd keeps running itself).

        Wietse



--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8054
Author: Thomas R. Stevenson
Date: Wed, 29 May 1996 00:00
47 lines
2914 bytes
Dave Barr (barr@math.psu.edu) wrote:
> In article <Pine.LNX.3.91.960529101428.853B-100000@tom.cc.wayne.edu>,
> Thomas Richard Stevenson  <tom@tom.cc.wayne.edu> wrote:
> >But in.nnrpd isn't a long running daemon.

> But innd is, which starts in.nnrpd.

Please forgive me, I'm not trying to be argumentative by what I'm
about to say. inetd is a long running daemon which starts other
daemons on the fly. tcpwrapper is set up to be able to intercept these
new daemons, and determine if the daemon should run or not. Why can't
tcpwrapper intercept daemons started by innd in the same way that it
intercepts daemons started by inetd? I know that it doesn't by
default, but there shouldn't be anything so special about inetd or
innd that would prevent tcpwrapper from being able to do this. I'm not
up to the task of changing tcpwrapper, but I thought there was a
chance that someone else already has. That was why I posted the
message in the first place.

> If you don't care about innd, then I don't see why you care about
> in.nnrpd.

It has nothing to do with caring about innd or not. innd isn't the
daemon that does the client/server connection to the user. in.nnrpd is
that daemon, and if we can control that daemon, we can do what we
want.


--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8059
Author: Dave Barr
Date: Wed, 29 May 1996 00:00
13 lines
996 bytes
In article <Pine.LNX.3.91.960529101428.853B-100000@tom.cc.wayne.edu>,
Thomas Richard Stevenson  <tom@tom.cc.wayne.edu> wrote:
>But in.nnrpd isn't a long running daemon.

But innd is, which starts in.nnrpd.

If you don't care about innd, then I don't see why you care about
in.nnrpd.

--Dave

Re: HELP: Can tcpwrapper be used to control access to INN?
#8060
Author: Thomas Richard Stevenson
Date: Wed, 29 May 1996 00:00
39 lines
2211 bytes
On Tue, 28 May 1996, Dave Barr wrote:

> In article <4oforl$ghq@cwis-20.wayne.edu>,
> Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:
> >We've been running INN version 1.4 for some time. We've been using
> >INN's nnrp.access file to control who has read/post access to out news
> >site, but would like to switch over to TCPWRAPPER if at all
> >possible. We've been using TCPWRAPPER for other services, and it would
> >be nice if we could control all services from one place.
> 
> Sorry, can't be done.
> 
> You're better off modifying INN to use tcp_wrapper's library access routines.
> tcp_wrapper's not designed to provide access control to long-running daemons.
> See the tcp_wrapper docs for more info.

But in.nnrpd isn't a long running daemon. It is started on demand when
someone wants to make a NEWS connection. It's just not started by
inetd.


     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."



Re: HELP: Can tcpwrapper be used to control access to INN?
#8064
Author: Scott Hazen Mueller
Date: Wed, 29 May 1996 00:00
14 lines
1179 bytes
In article <4og9pc$49e@augusta.math.psu.edu>, barr@math.psu.edu (Dave Barr) writes:
>Sorry, can't be done.

Strikes me, from his original posting, that he's putting tcpd where in.nnrpd
usually sits.  It's not obvious to me why that doesn't work.  In other words,
he's not wrapping innd.

-- 
Scott Hazen Mueller, guest of UUNET      zorch@uunet.uu.net or uunet!zorch
Moderator, news.admin.technical; submissions to natech@uunet.uu.net


Re: HELP: Can tcpwrapper be used to control access to INN?
#8072
Author: Dave Barr
Date: Wed, 29 May 1996 00:00
35 lines
1773 bytes
[trimming newsgroups again, since this has nothing to do with most all
of those newsgroups]

In article <4oi3mi$861@cwis-20.wayne.edu>,
Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:
>Dave Barr (barr@math.psu.edu) wrote:
>> If you don't care about innd, then I don't see why you care about
>> in.nnrpd.
>
>It has nothing to do with caring about innd or not. innd isn't the
>daemon that does the client/server connection to the user. in.nnrpd is
>that daemon, and if we can control that daemon, we can do what we
>want.

No, actually it's innd which decides if it should start in.nnrpd
or handle the connection itself.  That's what I mean about "don't
care about innd".  In your case it sounds like you don't care about
connections innd handles itself (feeds).

If this is true, to answer your question it's trivial.  cd to where
in.nnrpd is.

mkdir real
mv in.nnrpd real/in.nnrpd

Make a wrapper like this and put it in in.nnrpd's place:

#!/bin/sh
exec /path/to/tcpd /path/to/real/in.nnrpd $*


--Dave

Re: HELP: Can tcpwrapper be used to control access to INN?
#8084
Author: Brian Hernacki
Date: Thu, 30 May 1996 00:00
22 lines
1551 bytes
Scott Hazen Mueller wrote:
> 
> In article <4og9pc$49e@augusta.math.psu.edu>, barr@math.psu.edu (Dave Barr) writes:
> >Sorry, can't be done.
> 
> Strikes me, from his original posting, that he's putting tcpd where in.nnrpd
> usually sits.  It's not obvious to me why that doesn't work.  In other words,
> he's not wrapping innd.

So are you (or should I say is he) trying to have innd fire off tcpd for
each connection and then have tcpd exec the in.nnrpd? Not thinking about
it terribly much, this seems like it might work. Nasty, but it might
work....

--brian
--------------------------------------------------------
Brian Hernacki                 mailto:bhern@netscape.com
Usenet foot-soldier	       Netscape Communications
(setf disclaimer "I speak for myself, not the company")

Re: HELP: Can tcpwrapper be used to control access to INN?
#8094
Author: Thomas R. Stevenson
Date: Thu, 30 May 1996 00:00
68 lines
3177 bytes
Dave Barr (barr@math.psu.edu) wrote:
> [trimming newsgroups again, since this has nothing to do with most all
> of those newsgroups]

> In article <4oi3mi$861@cwis-20.wayne.edu>,
> Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:
> >Dave Barr (barr@math.psu.edu) wrote:
> >> If you don't care about innd, then I don't see why you care about
> >> in.nnrpd.
> >
> >It has nothing to do with caring about innd or not. innd isn't the
> >daemon that does the client/server connection to the user. in.nnrpd is
> >that daemon, and if we can control that daemon, we can do what we
> >want.

> No, actually it's innd which decides if it should start in.nnrpd
> or handle the connection itself.  That's what I mean about "don't
> care about innd".  In your case it sounds like you don't care about
> connections innd handles itself (feeds).

Correct. We only care about the in.nnrpd access. Nothing else.

> If this is true, to answer your question it's trivial.  cd to where
> in.nnrpd is.

> mkdir real
> mv in.nnrpd real/in.nnrpd

> Make a wrapper like this and put it in in.nnrpd's place:

> #!/bin/sh
> exec /path/to/tcpd /path/to/real/in.nnrpd $*


We did that, (well almost that), but it didn't work. Here is what we did:

mkdir /path/to/tcpwrapper_dir
cp /path/to/real/in.nnrpd /path/to/tcpwrapper_dir/in.nnrpd
cp /path/to/tcpd /path/to/real/in.nnrpd

This is about the same as your's but doesn't require the `exec`
script. The trouble was that it didn't work. That's why I posted the
message in the first place (we thought we had it right, but still
couldn't get it to work). After putting out my posts, I had the
opportunity to talk with the author of TCPWRAPPER, and he said (in his
words) that I had found a bug (the above should have worked). He gave
me the patch for the bug, I installed it, and now it's working as we
need it to.

--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8104
Author: Thomas R. Stevenson
Date: Thu, 30 May 1996 00:00
55 lines
3776 bytes
bill davidsen (davidsen@tmr.com) wrote:
> In article <4oi3mi$861@cwis-20.wayne.edu>,
> Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:

> | Please forgive me, I'm not trying to be argumentative by what I'm
> | about to say. inetd is a long running daemon which starts other
> | daemons on the fly. tcpwrapper is set up to be able to intercept these
> | new daemons, and determine if the daemon should run or not. Why can't
> | tcpwrapper intercept daemons started by innd in the same way that it
> | intercepts daemons started by inetd? I know that it doesn't by
> | default, but there shouldn't be anything so special about inetd or
> | innd that would prevent tcpwrapper from being able to do this. I'm not
> | up to the task of changing tcpwrapper, but I thought there was a
> | chance that someone else already has. That was why I posted the
> | message in the first place.

> I'm still missing why you want to use tcpwrapper to do validation
> and logging when you have in.nnrpd doing validation and logging. And
> unless you love overhead you would have to remove the code from
> in.nnrpd.

We wanted to control all services from one place. We didn't want to
edit file a for server A, and file b for service B. TCPWRAPPER allows
us to control all services (not just inn) from one place. By using
TCPWRAPPER, we tell all services (like inn) to allow all users, and
let TCPWRAPPER worry about the details.

> What you want to do is trivial and can be done by editing a single
> text file, but it seems to make no sense to do it...

What we wanted to do wasn't so trivial (at least not for us). We were
told by the author of TCPWRAPPER that this should work. After we
continued to have problems, he gave it a look, and found that we had
found a bug (in his words) in TCPWRAPPER, and gave us a fix to make it
work correctly. Once the fix was installed, it did just that.

--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8107
Author: bill davidsen
Date: Thu, 30 May 1996 00:00
29 lines
2459 bytes
In article <4oi3mi$861@cwis-20.wayne.edu>,
Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:

| Please forgive me, I'm not trying to be argumentative by what I'm
| about to say. inetd is a long running daemon which starts other
| daemons on the fly. tcpwrapper is set up to be able to intercept these
| new daemons, and determine if the daemon should run or not. Why can't
| tcpwrapper intercept daemons started by innd in the same way that it
| intercepts daemons started by inetd? I know that it doesn't by
| default, but there shouldn't be anything so special about inetd or
| innd that would prevent tcpwrapper from being able to do this. I'm not
| up to the task of changing tcpwrapper, but I thought there was a
| chance that someone else already has. That was why I posted the
| message in the first place.

I'm still missing why you want to use tcpwrapper to do validation
and logging when you have in.nnrpd doing validation and logging. And
unless you love overhead you would have to remove the code from
in.nnrpd.

What you want to do is trivial and can be done by editing a single
text file, but it seems to make no sense to do it...
--
	Bill Davidsen (davidsen@tmr.com)
Davidsen's first rule of system administration:
  He learns to swim soonest who is thrown in the deepest water.

Re: HELP: Can tcpwrapper be used to control access to INN?
#8115
Author: Paul Southworth
Date: Thu, 30 May 1996 00:00
23 lines
1466 bytes
In article <Ds6G43.ny@zorch.SF-Bay.ORG>,
Scott Hazen Mueller <scott@zorch.sf-bay.org> wrote:
>In article <4og9pc$49e@augusta.math.psu.edu>, barr@math.psu.edu (Dave Barr) writes:
>>Sorry, can't be done.
>
>Strikes me, from his original posting, that he's putting tcpd where in.nnrpd
>usually sits.  It's not obvious to me why that doesn't work.  In other words,
>he's not wrapping innd.

The question is probably how tcp wrapper wants to find out the source
address, as opposed to how innd/nnrpd handle it.  I'm too lazy to look,
but I suspect it won't work without ugly hacking.

Probably easier to run innd on some port other than 119 and invoke nnrpd
via inetd (under tcp wrapper) on port 119.  Then tell feeding sites to 
all "-P portnum" for nntplink or innxmit.

It turns the problem from any ugly hack into a non-hack.

--Paul

Re: HELP: Can tcpwrapper be used to control access to INN?
#8118
Author: Eric Schult
Date: Thu, 30 May 1996 00:00
52 lines
2518 bytes

In article <Pine.LNX.3.91.960529101428.853B-100000@tom.cc.wayne.edu> Thomas Richard Stevenson <tom@tom.cc.wayne.edu> writes:

   Newsgroups: news.software.nntp
   Date: Wed, 29 May 1996 10:16:22 -0400
   Organization: Wayne State University
   References: <4oforl$ghq@cwis-20.wayne.edu> <199605290138.VAA04402@augusta.math.psu.edu>

   On Tue, 28 May 1996, Dave Barr wrote:

   > In article <4oforl$ghq@cwis-20.wayne.edu>,
   > Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:
   > >We've been running INN version 1.4 for some time. We've been using
   > >INN's nnrp.access file to control who has read/post access to out news
   > >site, but would like to switch over to TCPWRAPPER if at all
   > >possible. We've been using TCPWRAPPER for other services, and it would
   > >be nice if we could control all services from one place.
   > 
   > Sorry, can't be done.
   > 
   > You're better off modifying INN to use tcp_wrapper's library access routines.
   > tcp_wrapper's not designed to provide access control to long-running daemons.
   > See the tcp_wrapper docs for more info.

   But in.nnrpd isn't a long running daemon. It is started on demand when
   someone wants to make a NEWS connection. It's just not started by
   inetd.


I've heard this can be done, but have't done it myself.

What I've heard is...

1) Move INND to another port, say 1119, and have your incoming
   feeds connect there.

and

2) Configure inetd to listen on port 119 and run the in.nnrpd daemon
   (or the tcpwrapper at this point).

By all intents and purposes, this SHOULD work, but YMMV.



--
Eric Schult                      E-Mail: eric.schult@mvision.com
Market Vision                    Voice:  1-212-306-0357
40 Rector Street NYC 10006       Fax:    1-212-233-1430

Re: HELP: Can tcpwrapper be used to control access to INN?
#8125
Author: Thomas R. Stevenson
Date: Thu, 30 May 1996 00:00
45 lines
2348 bytes
Paul Southworth (pauls@cic.net) wrote:
> In article <Ds6G43.ny@zorch.SF-Bay.ORG>,
> Scott Hazen Mueller <scott@zorch.sf-bay.org> wrote:
> >In article <4og9pc$49e@augusta.math.psu.edu>, barr@math.psu.edu (Dave Barr) writes:
> >>Sorry, can't be done.
> >
> >Strikes me, from his original posting, that he's putting tcpd where in.nnrpd
> >usually sits.  It's not obvious to me why that doesn't work.  In other words,
> >he's not wrapping innd.

> The question is probably how tcp wrapper wants to find out the source
> address, as opposed to how innd/nnrpd handle it.  I'm too lazy to look,
> but I suspect it won't work without ugly hacking.

The problem was that there was a bug in TCPWRAPPER (just a one line
bug fix provided by the author). Once fixed, it works as we thought it
should.

> Probably easier to run innd on some port other than 119 and invoke nnrpd
> via inetd (under tcp wrapper) on port 119.  Then tell feeding sites to 
> all "-P portnum" for nntplink or innxmit.

> It turns the problem from any ugly hack into a non-hack.

I think the one line bug fix to TCPWRAPPER was easier.

--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8131
Author: Anders Thulin
Date: Thu, 30 May 1996 00:00
26 lines
2085 bytes
In article <4oi3mi$861@cwis-20.wayne.edu>,
Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:

>daemons on the fly. tcpwrapper is set up to be able to intercept these
>new daemons, and determine if the daemon should run or not. 

  This is not quite correct: tcpwrapper doesn't intercept them, it is
responsible for starting them.  If it is inetd that usually starts the
demon, then the inetd.conf file must be modified to start tcpwrapper
instead, and pass a reference to the 'real' demon as arguments to it,
so that tcpwrapper can invoke it once it has decided that the
connection is legitimate.

  Thus, if innd starts in.nnrpd, then innd must be modified to invoke
tcpwrapper instead with the correct arguments.

  Tcpwrapper on its own won't be of any help -- it must be inserted
manually between the invoking program and the invoked program.  


-- 
Anders Thulin      Anders.Thulin@lejonet.se     013 - 23 55 32
Telia Research AB, Teknikringen 2B, S-583 30 Linkoping, Sweden

Re: HELP: Can tcpwrapper be used to control access to INN?
#8134
Author: Thomas R. Stevenson
Date: Thu, 30 May 1996 00:00
54 lines
3693 bytes
Anders Thulin (ath@nala.devnet.lejonet.se) wrote:
> In article <4oi3mi$861@cwis-20.wayne.edu>,
> Thomas R. Stevenson <tom@tom.cc.wayne.edu> wrote:

> >daemons on the fly. tcpwrapper is set up to be able to intercept these
> >new daemons, and determine if the daemon should run or not. 

>   This is not quite correct: tcpwrapper doesn't intercept them, it is
> responsible for starting them.  If it is inetd that usually starts the
> demon, then the inetd.conf file must be modified to start tcpwrapper
> instead, and pass a reference to the 'real' demon as arguments to it,
> so that tcpwrapper can invoke it once it has decided that the
> connection is legitimate.

>   Thus, if innd starts in.nnrpd, then innd must be modified to invoke
> tcpwrapper instead with the correct arguments.

>   Tcpwrapper on its own won't be of any help -- it must be inserted
> manually between the invoking program and the invoked program.  

The above isn't quite true either. tcpwrapper can run in one of two
modes. One mode (the mode you are talking about) is to modify
/etc/inetd.conf to replace a call to a daemon with a call to
tcpd. This requires that the daemon be started by inetd, and that an
entry for the daemon be in the /etc/inetd.conf file. The second way to
do this is to move the daemon to a fixed location known to tcpd, and
replace the daemon's bin with that of tcpd. In the second case, the
daemon can be started by anything (not just inetd), and you don't need
to include an entry in /etc/inetd.conf. Thus, when in.nnrpd is started
by innd, it is really starting tcpd. tcpd does the verification of the
user before calling the real in.nnrpd daemon. We are using this second
form, and (without changing anything within INN) we now have it
running (with help from the author of TCPWRAPPER).


--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8160
Author: Thomas R. Stevenson
Date: Fri, 31 May 1996 00:00
30 lines
1689 bytes
To all those that helped me with the problems I was having with INN
and TCPWRAPPER (with much thanks to the author of TCPWRAPPER who found
the bug in tcpd), I want to give you a big thank you!

To all those that said "it can't be done", "it will be an ugly
kludge", "there is no reason to do this", etc., maybe you should sit
back and let people that know what they are talking about answer
questions, because it could be done, it was a one line bug fix to
tcpd, and there were valid reasons to do it this way.


--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8201
Author: Scott Hazen Mueller
Date: Mon, 03 Jun 1996 00:00
32 lines
2047 bytes
In article <gergDsEEAE.7Hx@netcom.com>, gerg@netcom.com (Greg Andrews) writes:
>I think perhaps you ought to calm down a little bit.  It was clear to
>me that people pictured the TCP wrappers inokving innd (the binary
>that accepts connections on port 119), and what they said about that
>was completely correct.  If that wasn't what you had in mind, I think
>your question ought to have made that clearer.

Sorry to pick on you, Greg, but you do make such a convenient jump point:

|Message-ID: <4oforl$ghq@cwis-20.wayne.edu>

[...]

|To test INN with TCPWRAPPER, we moved in.nnrpd into TCPWRAPPER's
|REAL_DAEMON_DIR directory, and then move tcpd into the in.nnrpd. After
|making this switch, we tried to make a connection to INN, but in each
|case, the connection was just dropped.

Second paragraph of the original posting, first two sentences.  Sounds awfully
clear to me.  The first para. gave background, which appears reasonable on
the face of it.

It may be in your particular case that you missed the original posting; most
of the follow-ups left the quoted details out.

-- 
Scott Hazen Mueller, guest of UUNET      zorch@uunet.uu.net or uunet!zorch
Moderator, news.admin.technical; submissions to natech@uunet.uu.net


Re: HELP: Can tcpwrapper be used to control access to INN?
#8208
Author: Stefan Chakerian
Date: Mon, 03 Jun 1996 00:00
24 lines
2067 bytes
bill davidsen <davidsen@tmr.com> wrote:
�I'm still missing why you want to use tcpwrapper to do validation
�and logging when you have in.nnrpd doing validation and logging. And
�unless you love overhead you would have to remove the code from
�in.nnrpd.

I understand why he wants to do it; it was stated in his first post.  He
wants all of the access control in one area.  If he wants to change the
access for certain sites, he can change just one file.

The overhead would be an extra DNS lookup, which will already be cached.
If the connection won't be allowed, then there'll only be one lookup as
nnrpd won't get run.  Plus, all of his logging will be in one file.

				stef

-- 
Stefan Chakerian			Sysadmin, Sandia National Labs
schake@cs.sandia.gov			I do not speak for my employer

Don't anthropomorphize computers.  They don't like it.

Re: HELP: Can tcpwrapper be used to control access to INN?
#8211
Author: Thomas R. Stevenson
Date: Mon, 03 Jun 1996 00:00
77 lines
3919 bytes
Greg Andrews (gerg@netcom.com) wrote:

> Still, I think there is a potential problem with placing the access
> control under the TCP wrappers.  That means the admin who grants or
> denies NNTP connections must have root access on the server. 

Why do you say that? The TCPWRAPPER admin only has to have access
/etc/hosts.allow and /etc/hosts.deny files. These files can be
permitted to anyone that we want to maintain TCPWRAPPER. They don't
have to be owned by root. We have to trust the person(s) in charge of
TCPWRAPPER, but that's always true. It's true that the root id had to
create those two files (once), but after that, the owner of the file
can be changed to anyone we want. I must be missing something by your
comments.

> A very
> significant aspect of INN's design is how it reduces the amount of
> root access necessary to administer news.  Placing NNTP access under
> the TCP wrappers increases the amount of root access that's needed.

See above.

> This may not be an issue for you.  Your news admin may also have root
> on the same machine.  That may not be the case at other sites.  Here at
> Netcom, we have a web server with certain newsgroups on it.  The news
> admins don't have root on that machine for various reasons, mostly having
> to do with security.  Other news software would not contend with the
> http daemons for memory space as much as INN does, but INN wins out
> because the news admins don't need root access to maintain it.

See above.

> Also, the TCP wrappers obviously can't be used for username/password
> authentication, as the nnrp.access file can.

This part is true, and for sites that require username/password
authentication, TCPWRAPPER won't work (as far as I understand
TCPWRAPPER). We do not require this option. Is there that many sites
that do?

> It's nice to know that the TCP wrappers can be used to centralize
> access control for a server, but that's not necessarily a better thing
> to do.  Depends on what the server is used for and the administration
> policies at the site.

True, but being able to control all servers from one file is a big
plus to us. I also never started the post by saying that everyone
should switch over to doing it this way. It was a request for help
because we wanted to do it this way, and now we can. If it helps
someone else out at the same time, all the better.

>   -Greg
> -- 
> :::::::::::::::::::  Greg Andrews  gerg@netcom.com  :::::::::::::::::::
> ObGuindon:  Caution: This jacket has 37 Velcro(tm) closures.
>             Do not hug a moose with the flaps open.
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Re: HELP: Can tcpwrapper be used to control access to INN?
#8294
Author: bill davidsen
Date: Wed, 05 Jun 1996 00:00
38 lines
2869 bytes
In article <4ovodf$ebv@tesuque.cs.sandia.gov>,
Stefan Chakerian <schake@tesuque.cs.sandia.gov> wrote:
| bill davidsen <davidsen@tmr.com> wrote:
| �I'm still missing why you want to use tcpwrapper to do validation
| �and logging when you have in.nnrpd doing validation and logging. And
| �unless you love overhead you would have to remove the code from
| �in.nnrpd.
| 
| I understand why he wants to do it; it was stated in his first post.  He
| wants all of the access control in one area.  If he wants to change the
| access for certain sites, he can change just one file.
| 
| The overhead would be an extra DNS lookup, which will already be cached.
| If the connection won't be allowed, then there'll only be one lookup as
| nnrpd won't get run.  Plus, all of his logging will be in one file.

I don't know how to say it better than the paragraph you quoted but
misunderstood. Unless you disable the test and logging in in.nnrpd,
you will not have all the tests or logging in one place, you will
have two places which don't always agree with one another.

Also, tcpwrappers only control access, unless you let everyone do
everything, you will still need to control reading, posting, and
access to groups in the nnrp.access file. You also need to put your
access passwords there. Tcpwrappers are only physical access
control, nnrpd does that and much more.

I guess if you have a hammer you like really well you look for ways
to make all your problems look like nails. In any case, the problem
seems to be solved, so I guess it doesn't matter if it's a good idea
or not.
--
bill davidsen (davidsen@tmr.com)
  "I don't have time to read the manual, I'm too busy trying to
make the program work!"  -pten

Re: HELP: Can tcpwrapper be used to control access to INN?
#8298
Author: Thomas R. Stevenson
Date: Wed, 05 Jun 1996 00:00
109 lines
6101 bytes
When I created this post in the first place, I wasn't asking if this
was a good idea. I wasn't suggesting that anyone else should do it
this way. All I was asking was if it was possible, which it is, and
how to do it, which the author of TCPWRAPPER helped me do. Somehow my
request for help as turned into me defend the question, as if I don't
have the right to run my site the way I want. I wasn't asking for
justification from anyone to doing it the way we wanted to, I was only
asking for help in doing it the way we wanted to. In the environment
we are working in, controlling everything from one spot (TCPWRAPPER)
makes much more sense then controlling everything in each daemon's own
different way. If we have to give up some controls in order to do it
this way (today), we are willing to do so. If someday we decide we
need to have more control over some daemons, we will rethink the use
of TCPWRAPPER.

This isn't an all or nothing task. Just because we are doing it this
way, doesn't mean anyone else has to, nor does it mean that we will be
forced to do it this way forever either. But with the way some people
are being so negative about this simple request for help, you would
think I was some very powerful person that was forcing people to
change the way they control news daemons. I just can't understand why
people are being so defensive about this?

bill davidsen (davidsen@tmr.com) wrote:
> In article <4ovodf$ebv@tesuque.cs.sandia.gov>,
> Stefan Chakerian <schake@tesuque.cs.sandia.gov> wrote:
> | bill davidsen <davidsen@tmr.com> wrote:
> | �I'm still missing why you want to use tcpwrapper to do validation
> | �and logging when you have in.nnrpd doing validation and logging. And
> | �unless you love overhead you would have to remove the code from
> | �in.nnrpd.
> | 
> | I understand why he wants to do it; it was stated in his first post.  He
> | wants all of the access control in one area.  If he wants to change the
> | access for certain sites, he can change just one file.
> | 
> | The overhead would be an extra DNS lookup, which will already be cached.
> | If the connection won't be allowed, then there'll only be one lookup as
> | nnrpd won't get run.  Plus, all of his logging will be in one file.

> I don't know how to say it better than the paragraph you quoted but
> misunderstood. Unless you disable the test and logging in in.nnrpd,
> you will not have all the tests or logging in one place, you will
> have two places which don't always agree with one another.

With the install of TCPWRAPPER to control in.nnrpd, we've got a one
line nnrp.access file, which allows all users READ POST access. Given
that nnrp now allows everyone in (that can make it past TCPWRAPPER),
we don't care about any log file except the TCPWRAPPER log file. 

> Also, tcpwrappers only control access, unless you let everyone do
> everything

From the nnrp point of view, that is what we are doing. If you can get
past TCPWRAPPER, you can READ and POST news. If some day we want to
get a finer detail then this, we will have to rethink INN and
TCPWRAPPER. Until then, TCPWRAPPER does a good job of controlling what
we want.

> , you will still need to control reading, posting, and
> access to groups in the nnrp.access file. 

See above.

> You also need to put your
> access passwords there. 

We don't use passwords, so this is not a problem for us. If some day
we need this (see above).

> Tcpwrappers are only physical access
> control, nnrpd does that and much more.

We aren't, and have no plans on going beyond what TCPWRAPER gives us.

> I guess if you have a hammer you like really well you look for ways
> to make all your problems look like nails. In any case, the problem
> seems to be solved, so I guess it doesn't matter if it's a good idea
> or not.

For us, this is a good idea. I never said, or suggested, that it was a
good idea for anyone other than us. I never asked for people to
suggest better ways of doing this. We knew what we wanted, and
TCPWRAPPER did that very nicely.

> --
> bill davidsen (davidsen@tmr.com)
>   "I don't have time to read the manual, I'm too busy trying to
> make the program work!"  -pten

--

     ____  __   __   EMail:     tom@tom.cc.wayne.edu
      /   /_/  /_    VMail:     (313) 577-4742 
     /.  /\.  __/.   Fax:       (313) 577-5626
                     Home Page: http://tom.cc.wayne.edu
                     Anon FTP:  ftp://tom.cc.wayne.edu

   For my PGP PUBLIC KEY BLOCK,
       finger tom@tom.cc.wayne.edu

"A common mistake that people make when trying
 to design something completely foolproof was         Douglas Adams
 to underestimate the ingenuity of complete           Mostly Harmless
 fools."


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads