Thread View: news.software.nntp
21 messages
21 total messages
Started by Dean Carpenter
Tue, 11 Mar 1997 00:00
How to prevent INN from allowing connections from disallowed hosts ?
Author: Dean Carpenter
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
16 lines
979 bytes
979 bytes
I need a way to prevent INN from even acknowledging its' presence unless the client host is in an "allowed" file. I know about nnrp.access, but that still allows the host to connect and even get a list of newsgroups. It just prevents them from actually getting headers or reading articles. I want a "Connection refused" msg when a non-allowed host tries to connect -- Dean Carpenter dcarpenter@kraft.com deano@areyes.com
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Jeff Garzik
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
30 lines
1595 bytes
1595 bytes
(e-mail copies sent to authors) Karl Kleinpaste wrote: > dcarpenter@kraft.com (Dean Carpenter) writes: > > I know about nnrp.access, but that still allows the host to connect > > and even get a list of newsgroups. It just prevents them from actually > > getting headers or reading articles. I want a "Connection refused" msg > > when a non-allowed host tries to connect > Can't be done. TCP's design is such that a connection is accepted, > and then one can do things with it. The decision to connect is based > on the existence of the server listening on the port, not the origin > of the connecting client. What about /etc/hosts.deny? You could run NNTP readers through inetd, which allows that sort of finer-grained access control. Jeff -- Galbraith's Law of Human Nature: Faced with the choice between changing one's mind and proving that there is no need to do so, almost everybody gets busy on the proof.
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Karl Kleinpaste
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
21 lines
1552 bytes
1552 bytes
dcarpenter@kraft.com (Dean Carpenter) writes: > I need a way to prevent INN from even acknowledging its' presence > unless the client host is in an "allowed" file. > I know about nnrp.access, but that still allows the host to connect > and even get a list of newsgroups. It just prevents them from actually > getting headers or reading articles. I want a "Connection refused" msg > when a non-allowed host tries to connect Can't be done. TCP's design is such that a connection is accepted, and then one can do things with it. The decision to connect is based on the existence of the server listening on the port, not the origin of the connecting client. If your nnrp.access file is correct, the connecting client will be rejected after initial connect with "502 you're not allowed to talk", followed by immediate disconnect, so that no list of newsgroups, or anything else, can be accessed.
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Darrell Fuhriman
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
33 lines
2003 bytes
2003 bytes
Karl Kleinpaste <karl@jprc.com> writes: > Nope. INN has control of the NNTP port -- readers connect via innd, > not inetd. Innd in turn hands off to nnrpd when it finds that the > connecting client is not known to hosts.nntp (that is, fails the check > for being a feed host), and thereafter nnrpd checks against > nnrp.access and should fail there as well if the host is not welcome > at all. > > The solution is only and exactly nnrp.access. This is Unix, there is never only one way. The way I've done it is to create virtual interface (le0:whatever on solaris). Say "news" and "nntp" then modify innd to bind only to a specific interface (nntp) rather than INADDR_ANY. Next, you write a short inetd-like program to bind to the other interface (news) and fork off nnrpds. (Alternatively you may be able to do it by starting innd before inetd then run nnrpd out of inetd, though I've never tested that.) Have your feeders change to use nntp.whatever for incoming feeds, and your readers to use news.whatever for reading.[1] Problem solved. BTW, I've done exactly this on two servers. Darrell [1] This is a good thing to do anyway
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Dave Barr
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
15 lines
1069 bytes
1069 bytes
In article <MPG.d8f476d5680deb9989682@news.kraft.com>, Dean Carpenter <dcarpenter@kraft.com> wrote: >I need a way to prevent INN from even acknowledging its' presence >unless the client host is in an "allowed" file. > >I know about nnrp.access, but that still allows the host to connect >and even get a list of newsgroups. No it doesn't. It says "You have no permission to talk. Goodbye" and immediately closes the connection. --Dave
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Steinar Haug
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
29 lines
1923 bytes
1923 bytes
[Karl Kleinpaste] | > > The decision to connect is based | > > on the existence of the server listening on the port, not the origin | > > of the connecting client. | | Jeff Garzik <jeff.garzik@spinne.com> writes: | > What about /etc/hosts.deny? You could run NNTP readers through inetd, | > which allows that sort of finer-grained access control. | | Nope. INN has control of the NNTP port -- readers connect via innd, | not inetd. Innd in turn hands off to nnrpd when it finds that the | connecting client is not known to hosts.nntp (that is, fails the check | for being a feed host), and thereafter nnrpd checks against | nnrp.access and should fail there as well if the host is not welcome | at all. It's perfectly possible to run innd for the feeders on for instance port 433, and run nnrpd from inetd om port 119. We do it here - works fine. But the point is still valid: There is no real difference between the access control in nnrpd.access, and the access control in TCP wrappers/ hosts.deny. A TCP connection is accepted, an access list is checked and the TCP connection is either closed or allowed to continue. Steinar Haug, Nethelp consulting, sthaug@nethelp.no
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Clayton O'Neill
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
20 lines
1480 bytes
1480 bytes
On 11 Mar 1997 13:42:25 -0500, Karl Kleinpaste <karl@jprc.com> wrote: >Jeff Garzik <jeff.garzik@spinne.com> writes: >> What about /etc/hosts.deny? You could run NNTP readers through inetd, >> which allows that sort of finer-grained access control. > >Nope. INN has control of the NNTP port -- readers connect via innd, >not inetd. Innd in turn hands off to nnrpd when it finds that the >connecting client is not known to hosts.nntp (that is, fails the check >for being a feed host), and thereafter nnrpd checks against >nnrp.access and should fail there as well if the host is not welcome >at all. > >The solution is only and exactly nnrp.access. Not exactly. You can run innd on another port and run nnrpd under inetd or tcpserver, etc.
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Karl Kleinpaste
Date: Tue, 11 Mar 1997 00:00
Date: Tue, 11 Mar 1997 00:00
20 lines
1456 bytes
1456 bytes
Karl Kleinpaste wrote: > > The decision to connect is based > > on the existence of the server listening on the port, not the origin > > of the connecting client. Jeff Garzik <jeff.garzik@spinne.com> writes: > What about /etc/hosts.deny? You could run NNTP readers through inetd, > which allows that sort of finer-grained access control. Nope. INN has control of the NNTP port -- readers connect via innd, not inetd. Innd in turn hands off to nnrpd when it finds that the connecting client is not known to hosts.nntp (that is, fails the check for being a feed host), and thereafter nnrpd checks against nnrp.access and should fail there as well if the host is not welcome at all. The solution is only and exactly nnrp.access.
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Joe Greco
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
29 lines
1868 bytes
1868 bytes
In news.software.nntp article <vxku3micql3.fsf@pocari-sweat.jprc.com>, Karl Kleinpaste <karl@jprc.com> wrote: :dcarpenter@kraft.com (Dean Carpenter) writes: :> I need a way to prevent INN from even acknowledging its' presence :> unless the client host is in an "allowed" file. : :> I know about nnrp.access, but that still allows the host to connect :> and even get a list of newsgroups. It just prevents them from actually :> getting headers or reading articles. I want a "Connection refused" msg :> when a non-allowed host tries to connect : :Can't be done. TCP's design is such that a connection is accepted, :and then one can do things with it. The decision to connect is based :on the existence of the server listening on the port, not the origin :of the connecting client. And my firewall doesn't give a damn about what TCP's connect paradigm was, if I choose to do deny tcp from * to news.119 allow tcp from my.cidr/size to news.119 on my firewall, I've done precisely what this gentleman asks (I can set the deny statement to cause a Connection refused to be returned, although usually I just bit bucket the data). ... JG
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Dean Carpenter
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
22 lines
1317 bytes
1317 bytes
In article <MPG.d8f476d5680deb9989682@news.kraft.com>, dcarpenter@kraft.com says... --> I need a way to prevent INN from even acknowledging its' presence --> unless the client host is in an "allowed" file. --> --> I know about nnrp.access, but that still allows the host to connect --> and even get a list of newsgroups. It just prevents them from actually --> getting headers or reading articles. I want a "Connection refused" msg --> when a non-allowed host tries to connect Hmmm. Looks like this isn't going to be possible. What about disallowing *any* commands unless the host is listed in the nnrp.access or hosts.nntp files ? -- Dean Carpenter dcarpenter@kraft.com deano@areyes.com
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Joe Greco
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
22 lines
1722 bytes
1722 bytes
In news.software.nntp article <5g4f0d$h5p@verdi.nethelp.no>, sthaug@nethelp.no (Steinar Haug) wrote: :It's perfectly possible to run innd for the feeders on for instance port :433, and run nnrpd from inetd om port 119. We do it here - works fine. Or, have multiple alias addresses and bind INN to one, and connectd to another. We do it here - works even better, because connectd can be made "smart". :But the point is still valid: There is no real difference between the :access control in nnrpd.access, and the access control in TCP wrappers/ :hosts.deny. A TCP connection is accepted, an access list is checked and :the TCP connection is either closed or allowed to continue. That's not quite what you meant to say, I'm sure. There IS a real difference between the access control methods: nnrp.access allows you to control aspects of the session, in addition to pass/fail connection authorization. TCP wrappers doesn't. ... JG
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Sven Paulus
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
18 lines
1473 bytes
1473 bytes
Clayton O'Neill <coneill@oneill.net> wrote: >>The solution is only and exactly nnrp.access. CO> Not exactly. You can run innd on another port and run nnrpd under inetd or CO> tcpserver, etc. Or if your OS supports firewalling, you can setup some firewalling rules for incoming packets, restricting connections to port 119 only for some hosts. Works perfectly when using Linux, just a few lines of "ipfwadm". Sven -- --Sven-Paulus----------28-48-32--3-----ub6v@rz.uni-karlsruhe.de------ --Karlstr.-55----------30--2-50-29-----sven@oops.sub.de-------------- --D-76133-Karlsruhe----44-49-10--8-----T#-49-721-9375094-------irc--- --Fido-2:2476/530-------9-12-19-71-----F#-49-721-9375095-----svennie-
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Steinar Haug
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
20 lines
1540 bytes
1540 bytes
[Joe Greco] | :But the point is still valid: There is no real difference between the | :access control in nnrpd.access, and the access control in TCP wrappers/ | :hosts.deny. A TCP connection is accepted, an access list is checked and | :the TCP connection is either closed or allowed to continue. | | That's not quite what you meant to say, I'm sure. There IS a real | difference between the access control methods: nnrp.access allows | you to control aspects of the session, in addition to pass/fail | connection authorization. TCP wrappers doesn't. Quite agree. I was basically trying to correct the impression I got from a previous poster that using TCP wrappers was in some way superior to a standard nnrp.access solution. Steinar Haug, Nethelp consulting, sthaug@nethelp.no
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Cracker Buster
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
37 lines
2311 bytes
2311 bytes
On Wed, 12 Mar 1997, Dean Carpenter wrote:
> dcarpenter@kraft.com says...
> --> I need a way to prevent INN from even acknowledging its' presence
> --> unless the client host is in an "allowed" file.
> -->
> --> I know about nnrp.access, but that still allows the host to connect
> --> and even get a list of newsgroups. It just prevents them from actually
> --> getting headers or reading articles. I want a "Connection refused" msg
>
> Hmmm. Looks like this isn't going to be possible. What about
> disallowing *any* commands unless the host is listed in the nnrp.access
> or hosts.nntp files ?
Hang on a sec. Now you mention hosts.nntp, and it would match the
behavior you describe (host is able to connect and LIST, but can't do any
reading) if your host in question is listed in hosts.nntp (meaning the
peer has permission to send you news), *or* if you are running INN in
promiscuous mode with -a to allow anyone to connect.
Is your host in question in hosts.nntp? That could explain it. Do
you have any wildcards in nnrp.access, and if so, what is the order of
entries in this file? If you are connecting from the host which you want
to deny access, what happens when you give the command after connecting
and seeing the greeting (and by the way, what does the greeting look
like?), the command being MODE READER ?
Anyway, in the absence of a wildcard entry in nnrp.access, an unwanted
peer will be told to 502 Buzz off mate. So you've got something that's
defeating this.
BArry Bouwsma, Radio Praha BNAFH
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: bill davidsen
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
23 lines
1542 bytes
1542 bytes
In article <MPG.d8f476d5680deb9989682@news.kraft.com>, Dean Carpenter <dcarpenter@kraft.com> wrote: | I need a way to prevent INN from even acknowledging its' presence | unless the client host is in an "allowed" file. | | I know about nnrp.access, but that still allows the host to connect | and even get a list of newsgroups. It just prevents them from actually | getting headers or reading articles. I want a "Connection refused" msg | when a non-allowed host tries to connect INN can't do what you want, since it has to open the connect before it can check the IP. You can do this with a cheap router, or Linux box configured as a router, or some such. What's wrong with the "502 You have no permission to talk. Goodbye." message from INN? -- -bill davidsen (davidsen@tmr.com) "As a software development model, Anarchy does not scale well." -Dave Welch
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Karl Kleinpaste
Date: Wed, 12 Mar 1997 00:00
Date: Wed, 12 Mar 1997 00:00
32 lines
2394 bytes
2394 bytes
Darrell Fuhriman <darrell@grumblesmurf.net> critiques my assertion about single ownership of the NNTP port: > The way I've done it is to create virtual interface (le0:whatever > on solaris). Say "news" and "nntp" then modify innd to bind only > to a specific interface (nntp) rather than INADDR_ANY. Next, you > write a short inetd-like program to bind to the other interface > (news) and fork off nnrpds. I would have to say, first, that this a very interesting alternate solution to the problem. However, the original question revolved around simple disallowance of certain hosts. The poster was so technically unaware of his situation that he didn't realize that nnrp.access is entirely adequate to the basic issue at hand. Such a person doesn't need suggestions to hack heavily on INN while simultaneously writing an inetd replacement, or to go on a full frontal assault of the IP stack so as to modify the API in order to allow an origin-based decision to RST or ACK the initial SYN (suggested to me in email), or to place INN on an alternate port. The problem was merely that he wants to prevent disallowed hosts from being able even to get a group list. nnrp.access is the solution to that, and that is all that needed to be said. The fact that a dozen other highly complex solutions involving INN code changes (above) or nonstandard management practices (INN on alternate port) or kernel hackery (IP frontal assault) is not germane to the question at hand. nnrp.access can provide the semantic equivalence to /etc/hosts.deny, and that is all the user asked for.
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Rahul Dhesi
Date: Thu, 13 Mar 1997 00:00
Date: Thu, 13 Mar 1997 00:00
20 lines
1469 bytes
1469 bytes
In <vxku3micql3.fsf@pocari-sweat.jprc.com> Karl Kleinpaste <karl@jprc.com> writes: >> I want a "Connection refused" msg >> when a non-allowed host tries to connect >Can't be done. TCP's design is such that a connection is accepted, >and then one can do things with it. In theory this can be done by a gateway router with a smart packet filter. I even remember somebody mentioning that such routers do exist, but no specific brand or model comes to mind. -- Rahul Dhesi <dhesi@spams.r.us.com> a2i communications, a quality ISP with sophisticated anti-junkmail features ** message body scan immune to fake headers *** see http://www.rahul.net/ >>> "please ignore Dhesi" -- Mark Crispin <mrc@CAC.Washington.EDU> <<<
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: James Brister
Date: Thu, 13 Mar 1997 00:00
Date: Thu, 13 Mar 1997 00:00
45 lines
2494 bytes
2494 bytes
Simon Burr <simes@bpfh.net> writes:
> bill davidsen wrote:
> > What's wrong with the "502 You have no permission to talk.
> > Goodbye." message from INN?
>
> Someone trying to connect lots of times is a possible denial of service
> attack if the message is from nnrpd. All they have to do is attempt
> connects lots of times a second. Each one will result in an nnrpd
> being started.
Not if you use the H, T and X flags.
-H -T -X
The ``-H'', ``-T'', and ``-X'' flags control the
number of connects per minute allowed. This code
is meant to protect your server from newsreader
clients that make too many connects per minute to
your server. You should probably not use it unless
you are having a problem. The table used for these
checks is fixed at 128 entries and is used as a
ring. The size was chosen to make calculating the
index easy and to be pretty sure you won't run out
of space. In practice, it is doubtful that you
will use even half the table at any given moment.
The ``-H'' flag limits the number of times a host
is allowed to connect to the server per ``-X'' sec�
onds. The default is 2.
The ``-T'' flag limits the total number of incoming
connects to innd per ``-X'' seconds. The maximum
value is 128. The default is 60.
The ``-X'' sets the number of seconds used by the
``-H'' and ``-T'' flags. A value of zero turns off
checking. The default is 0.
James
--
James Brister brister@vix.com
Internet Software Consortium http://www.isc.org inn@isc.org
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Dean Carpenter
Date: Thu, 13 Mar 1997 00:00
Date: Thu, 13 Mar 1997 00:00
35 lines
2005 bytes
2005 bytes
In article <5g7e42$rbu@newssvr05-int.news.prodigy.com>, davidsen@tmr.com says... --> In article <MPG.d8f476d5680deb9989682@news.kraft.com>, --> Dean Carpenter <dcarpenter@kraft.com> wrote: --> | I need a way to prevent INN from even acknowledging its' presence --> | unless the client host is in an "allowed" file. --> | --> | I know about nnrp.access, but that still allows the host to connect --> | and even get a list of newsgroups. It just prevents them from actually --> | getting headers or reading articles. I want a "Connection refused" msg --> | when a non-allowed host tries to connect --> --> INN can't do what you want, since it has to open the connect before --> it can check the IP. You can do this with a cheap router, or Linux --> box configured as a router, or some such. --> --> What's wrong with the "502 You have no permission to talk. --> Goodbye." message from INN? I don't get it. Now it's working. Although I haven't checked with Netscape again, just with tin and Gravity. Earlier I was finding that with Netscape, it would connect and get the full list of all newsgroups. It wasn't until trying to go into a group, getting the headers for it that the permissions message came up. Argh. Later today I'll test it again with Netscape. -- Dean Carpenter dcarpenter@kraft.com deano@areyes.com
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Dean Carpenter
Date: Thu, 13 Mar 1997 00:00
Date: Thu, 13 Mar 1997 00:00
36 lines
2112 bytes
2112 bytes
In article <Pine.LNX.3.93.970312195334.120X-100000@radostne- vanoce.radio.cz>, luser@Radio.CZ says... --> On Wed, 12 Mar 1997, Dean Carpenter wrote: --> --> > dcarpenter@kraft.com says... --> > --> I need a way to prevent INN from even acknowledging its' presence --> > --> unless the client host is in an "allowed" file. --> > --> --> > --> I know about nnrp.access, but that still allows the host to connect --> > --> and even get a list of newsgroups. It just prevents them from actually --> > --> getting headers or reading articles. I want a "Connection refused" msg --> > --> > Hmmm. Looks like this isn't going to be possible. What about --> > disallowing *any* commands unless the host is listed in the nnrp.access --> > or hosts.nntp files ? --> --> Hang on a sec. Now you mention hosts.nntp, and it would match the --> behavior you describe (host is able to connect and LIST, but can't do any --> reading) if your host in question is listed in hosts.nntp (meaning the --> peer has permission to send you news), *or* if you are running INN in --> promiscuous mode with -a to allow anyone to connect. Bingo. That was it. I did the original testing from a machine that was in both files. Subsequent testing was from other machines, and nnrp.access worked as advertised. Thank you all - -- Dean Carpenter dcarpenter@kraft.com deano@areyes.com
Re: How to prevent INN from allowing connections from disallowed hosts ?
Author: Simon Burr
Date: Thu, 13 Mar 1997 00:00
Date: Thu, 13 Mar 1997 00:00
26 lines
1717 bytes
1717 bytes
bill davidsen wrote:
> What's wrong with the "502 You have no permission to talk.
> Goodbye." message from INN?
Someone trying to connect lots of times is a possible denial of service
attack if the message is from nnrpd. All they have to do is attempt
connects lots of times a second. Each one will result in an nnrpd
being started. If this is done enough it can cause a high load on the
server from the starting of the processes. I have heard that this
situation may[1] change, with innd doing some checks before it starts
of an nnrpd.
Even worse is when a client connects lots of times and doesn't issue
any commands. The nnrpd timesout after 30 seconds and goes away. However,
if the client is connecting 5-10 times a second, this can cause quite
a high load on a machine.
[1] Or it may have changed already. I'm not current with INN anymore.
--
Simon Burr Work: simes@uunet.pipex.com
One of the trolls at UUNET (UK) Play: simes@bpfh.net
"Just what are the sexual habits of shopping trolleys ?"
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