🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
4 messages
4 total messages Started by Greg Olsby Wed, 25 Jun 1997 00:00
virtual news hosting??
#18718
Author: Greg Olsby
Date: Wed, 25 Jun 1997 00:00
29 lines
1371 bytes
I'm looking for news software that easily support "virtual news hosting".

I want to manage private news groups for many domains on a sinlge news
server?

What do I mean??
--------------------
I wish to host a large number of companies and their private support news
groups...on a single server, (e.g. news server names of support.abc.com and
news.def.com) 

then, each "virtual" news domain might have a dozen "local" news groups
created around their own product lines.

Since these groups would be targeted at a company's customer base (like
msnew.microsoft.com or support.symantec.com), there's no need nor do I wish
to "feed" these news groups to other hosts or download news from other
servers.

Oviously, these "private" newsgroups would be accessible via the Net.

Any products out there?





Re: virtual news hosting??
#18807
Author: Greg Olsby
Date: Fri, 27 Jun 1997 00:00
16 lines
1012 bytes
Thanks for the feedback. 

I'm really hoping for a solution that won't require workarounds. DNews has
indicated they might be incorporating the "virtual" news hosting later.

I didn't mention a platform on purpose. My preference is Linux or NT...but
my ultimate choice will be determined by the software functionality.

If I come across something, I'll let you know.

 [snip]



Re: virtual news hosting??
#18816
Author: Forrest J. Cavalier III
Date: Fri, 27 Jun 1997 00:00
37 lines
1793 bytes
In article <5osu9i$f05$1@brokaw.wa.com>, grego@nwnexus.com wrote...
>
>I'm looking for news software that easily support "virtual news hosting".
>
>I want to manage private news groups for many domains on a sinlge news
>server?
>

You didn't say what OS/platform you wanted to use.

I think INN on Unix can *almost* do what you want.  I'd
be interested in knowing if you get any other responses
from product vendors.

I provide news server consulting, specializing in
INN customizations.  Let me know if I can be of service,
or you need help doing what you describe.  I have not
done it, but I am very familiar with the INN architecture.

- You need to apply a patch to bind to only a single IP address.
Patch courtesy of Joe Greco.  Listed in my INN documentation
project:
     http://www.mibsoftware.com/userkt/inn/patches/0011.htm

- Unless you can have it work with chroot, you have to
compile a version for each IP address, because the location of
the spool and configuration files are INN compile-time options.
(This behavior could be changed in a custom version of INN.)

There are some other alternative ways of doing it, using
modifications to nnrpd.

Forrest Cavalier, Mib Software, INN customization and consulting


Re: virtual news hosting??
#18831
Author: Sven Paulus
Date: Sat, 28 Jun 1997 00:00
125 lines
4647 bytes
Forrest J. Cavalier III <mibsoft@epix.net> wrote:
>>I'm looking for news software that easily support "virtual news hosting".
 FJ CI> - You need to apply a patch to bind to only a single IP address.
 FJ CI> - Unless you can have it work with chroot, you have to
 FJ CI> compile a version for each IP address, because the location of
 FJ CI> the spool and configuration files are INN compile-time options.

This is not the easy solution: Since he doesn't want the newsgroups to be
feeded to other servers, just one INN is needed.

I think it would be about half an hour of work to enhance nnrpd.c to do a
getsockname() and instead of getting the "accesslist" (a comma-delimited
list of newsgroups patterns, to which the user has access) in PERMinfile()
to read it from a different file which lists the ip addresses and available
newsgroups ("192.168.0.1 mickeysoft.*,general.*").

Ok, just for fun I did this patch: It introduces a new file
/etc/news/groupaccess in the format mentioned above. Just add an entry
"*:Read Post:::!*" to nnrpd.access to allow global access and a line for
each of your virtual IP addresses listing the available newsgroup pattern in
/etc/news/groupaccess. It's completely untested, but it should work.

--- nnrpd-orig/nnrpd.c	Tue Jan 14 15:07:54 1997
+++ nnrpd-virtual/nnrpd.c	Sat Jun 28 13:43:30 1997
@@ -301,6 +301,38 @@
 }
 #endif	/* defined(DO_NNRP_GETHOSTBYADDR) */
 
+void
+PERMadd(addr, accesslist)
+    char 		*addr;
+    char		*accesslist;
+{
+    register FILE	*F;
+    char		*chr1, *chr2;
+    char		buff[BIG_BUFFER];
+
+    if (!*accesslist)
+	return;
+
+    if ((F = fopen(VIRTACCESS, "r")) == NULL) {
+	syslog(L_ERROR, "%s cant fopen %s %m", ClientHost, VIRTACCESS);
+	return;
+    }
+    
+    while (fgets(buff, sizeof buff, F) != NULL) {
+	if (strncmp(buff, addr,	strlen(addr)))
+	    continue;
+	if ((chr1 = strpbrk(buff, " \t")) == NULL)
+	    continue;
+	while (*chr1 == ' ' || *chr1 == '\t')
+	    chr1++;
+	if ((chr2 = strpbrk(chr1, " \t")) != NULL)
+	    chr2 = '\0';
+	(void)strcat(accesslist, ",");
+	(void)strcat(accesslist, chr1);
+    }
+    
+    (void)fclose(F); 	
+}
 
 BOOL
 PERMinfile(hp, ip, user, pass, accesslist)
@@ -385,7 +417,7 @@
     struct sockaddr_in	sin;
     int			length;
     char		buff[SMBUF];
-    char		*ClientAddr;
+    char		*ClientAddr, MyAddr[20];
 
     /* Get the peer's name. */
     length = sizeof sin;
@@ -440,7 +472,21 @@
 
     strncpy (LogName,ClientHost,sizeof(LogName)-1) ;
 
-    syslog(L_NOTICE, "%s connect", ClientHost);
+    /* Get my address */
+    length = sizeof sin;
+    *MyAddr = '\0';
+    if (getsockname(STDIN, (struct sockaddr *)&sin, &length) < 0) {
+	if (!isatty(STDIN)) {
+	    syslog(L_ERROR, "%s cant getsockname %m", "?");
+	    Printf("%d I can't get my name.  Goodbye.\r\n", NNTP_ACCESS_VAL);
+	    ExitWithStats(1);
+	}
+    }
+    else if (sin.sin_family == AF_INET) {
+	(void)strcpy(MyAddr, inet_ntoa(sin.sin_addr));
+    }
+
+    syslog(L_NOTICE, "%s connect to %s", ClientHost, *MyAddr ? MyAddr: "?");
     if (!PERMinfile(ClientHost, ClientAddr, (char *)NULL, (char *)NULL,
 	    accesslist)) {
 	syslog(L_NOTICE, "%s no_access", ClientHost);
@@ -448,6 +494,7 @@
 	    NNTP_ACCESS_VAL);
 	ExitWithStats(1);
     }
+    PERMadd(MyAddr, accesslist);
 }
 
 
diff -ur nnrpd-orig/nnrpd.h nnrpd-virtual/nnrpd.h
--- nnrpd-orig/nnrpd.h	Tue Jan 14 14:47:44 1997
+++ nnrpd-virtual/nnrpd.h	Sat Jun 28 13:28:10 1997
@@ -34,6 +34,7 @@
 #define ART_LINE_LENGTH		1000
 #define ART_LINE_MALLOC		1024
 
+#define VIRTACCESS "/etc/news/groupaccess"
 
 /*
 **  Some convenient shorthands.


Sven
-- 
--Sven-Paulus----------28-48-32--3-----ub6v@rz.uni-karlsruhe.de------
--Karlstr.-55----------30--2-50-29-----sven@oops.sub.de-----3C9A6091-
--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-

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