HOSTS.NNTP(5)

πŸ’– HOSTS.NNTP πŸ’–

okay bestie, gather round, because this one is literally the guest list for your Usenet server and you're gonna want to read it fr fr πŸŽ€


✨ NAME ✨

hosts.nntp, hosts.nntp.nolimit β€” the list of hosts that feed NNTP news πŸ‘‘


🌸 DESCRIPTION 🌸

so basically, the file /etc/news/hosts.nntp gets read by innd(8) to figure out which hosts are feeding your local site its Usenet news over the NNTP protocol. the server reads this file at start-up, or whenever ctlinnd(8) tells it to. πŸ’«

here's the vibe: when some host connects to the NNTP port of the machine where innd is running, the server does a little vibe check πŸ” on their Internet address to see if it matches any of the hosts named in this file. if the host is not mentioned? then innd spawns an nnrpd(8) to handle the connection, with the accepted connection sitting on standard input and standard output. iconic behaviour, honestly.

comments begin with a number sign (#) and run all the way to the end of the line. blank lines and comments are ignored too, no stress. every other line should have two or three fields, separated by a colon. periodt. 🫢

the first field should be either an Internet address in dotted-quad format, or an address that can be parsed by gethostbyname(3). if a host's entry has multiple addresses, all of them get added to the access list. no picking favourites. πŸ’…

the second field, which may be blank, is the password the foreign host is required to use when it first connects. πŸ”

the third field, which may be omitted, is a list of newsgroups the host is allowed to send articles to. this list gets parsed as a newsfeeds(5) subscription list, and groups not in the list are just… ignored, sorry babe. also, posts crossposted in groups matched by a @group.* entry are dropped. πŸ’€

for example:

##  FOO has a password, UUNET and VIX dont.
##  UUNET cannot post to local groups.
##  Example is not part of Usenet II.
##  These are comment lines.
news.foo.com:magic
uunet.uu.net::!foo.*
data.ramona.vix.com:
newspeer.example.com::*,@net.*

πŸ¦‹ the /s suffix πŸ¦‹

the first field may be suffixed by /s to indicate that streaming commands are specifically permitted to be used by this host. by default, streaming commands are available to all hosts. but if any entry in hosts.nntp has an /s suffix, then only those hosts with the /s suffix are permitted to use streaming commands. gatekeeping, but make it config. πŸ™ˆ

for example, with the following hosts.nntp file, only the host data.ramona.vix.com is allowed to use the streaming commands:

## As above, but
news.foo.com:magic
uunet.uu.net::!foo.*
data.ramona.vix.com/s:

πŸŽ€ the /a and /t suffixes πŸŽ€

the first field may be suffixed by /a to indicate that the IP address of the feeding hosts allowed by this entry should always be included in the Path line of articles. or by /t to indicate that the address should not be included. or /a followed by a pathhost value, to indicate that the IP address should be included if the most recent Path entry does not match the pathhost specified after /a. 🧚

the default is to log the address in articles whose most recent Path entry is not the same as the hostname in the hosts.nntp entry. yeah, it's a whole thing.


🌈 boot-time chaos and the reload workaround 🌈

since innd is usually started at system boot time, the local nameserver may not be fully operational when innd parses this file. 😭 as a work-around, a ctlinnd reload command can be performed after a delay of an hour or so. it's also possible to provide both a host's name and its dotted-quad address in the file. multitasking queen. πŸ‘‘

⚠️ if the file contains passwords, it should not be world-readable. keep that secret, bestie, fr fr.

πŸ’œ hosts.nntp.nolimit πŸ’œ

the file /etc/news/hosts.nntp.nolimit, if it exists, is read whenever the hosts.nntp file is read. it has the same format, although only the first field is used. any host mentioned in this file is not subject to the incoming connections limit specified by innd's -i flag. πŸšͺ✨

this can be used to allow local hosts, or time-sensitive peers, to connect regardless of the local conditions. VIP access only. πŸ’…


πŸ“œ HISTORY πŸ“œ

written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. this is revision 1.22, dated 1996/11/27.


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie 🫢 this lil slice of File Formats Manual realness is HOSTS.NNTP(5), and it's serving revision 1.22 energy, dated 1996/11/27 β€” old but gold, no cap. go configure your feeds and slay πŸ’–βœ¨πŸŽ€