public inbox for nncp-devel@lists.stargrave.org Atom feed
* Air Gap & News @ 2020-12-26 10:25 William Hay 2020-12-26 14:10 ` John Goerzen 2020-12-26 16:31 ` Sergey Matveev 0 siblings, 2 replies; 8+ messages in thread From: William Hay @ 2020-12-26 10:25 UTC (permalink / raw) To: nncp-devel I came across nncp recently and it seems interesting but the documentation could do with some improvement. http://www.nncpgo.org/UsecaseAirgap.html#UsecaseAirgap Says it is about using nncp via air gap but AFAICT only describes how to send via a network connected intermediate machine. No documentation, or even example, is given for configuring the intermediate machine to copy the packets to removable storage. http://www.nncpgo.org/Comparison.html#Comparison Says No for sneakernet friendliness/UUCP while the commentary says this requires more manual configuration. I set this up a few years ago for myself and although there is a little setup work once done it is about as automatic as sneakernet can get. https://www.dumain.com/posts/Forward_to_the_1970s_with_UUCP.../ This could be more secure but my threat model doesn't involve targetted attacks so a little security throught obscurity sprinkled over the air gap seemed sufficient. I might replace it with NNCP if the airgap documentationwere better. Under News Transmission it says Yes for UUCP and No for NNCP. The only support UUCP has for news transmission is that if your news system supplies an rnews binary then it will be enabled for remote execution by default. AFAICT there is nothing to prevent enabling rnews remote execution over NNCP or configuring your news server to send rnews batches via NNCP (replace uux command in uucp recipies with nncp equivalent). Also saying UUCP only supports PAP for peer authentication is somewhat misleading since, by tying each peer to a particular unix login, it can use whatever authentication your OS provides (most of my uucp nodes authenticate via ssh keys). William ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-26 10:25 Air Gap & News William Hay @ 2020-12-26 14:10 ` John Goerzen 2020-12-26 16:49 ` Sergey Matveev 2020-12-26 16:31 ` Sergey Matveev 1 sibling, 1 reply; 8+ messages in thread From: John Goerzen @ 2020-12-26 14:10 UTC (permalink / raw) To: William Hay; +Cc: nncp-devel Good morning/tzag, First of all, I was planning to send a message here in the next day or two about this anyhow, but I'm working on a series of blog posts about NNCP. You can see them at https://changelog.complete.org/archives/tag/asynchronous and I've got several more planned, covering using NNCP for Exim, using NNCP to handle both ZFS and non-ZFS backups, etc. I wonder, William, if that's where you came across NNCP recently? Anyhow... What you're looking for may have been just a few clicks away at: http://www.nncpgo.org/UsecaseNoLink.html Also check out http://www.nncpgo.org/UsecaseBroadcast.html#UsecaseBroadcast So basically NNCP comes with two commands to make this use case really easy: nncp-xfer and nncp-bundle. nncp-xfer is probably the more practical for most airgapped use cases. http://www.nncpgo.org/UsecaseBroadcast.html#UsecaseBroadcast discusses it. The "via" option at http://www.nncpgo.org/Configuration.html#Configuration -- also overridable via the command-line on various tools -- sets the default routing to a machine. The reference under http://www.nncpgo.org/Commands.html#Commands may also be useful to you. When I get my next blog post written - hopefully later today - I will include a UUCP<->NNCP command reference as well. I'm an old hand at UUCP (by which I mean I maintained it for an ISP in the 90s but haven't touched it since, so some of it has bitrotted out of my brain). I've been pretty excited about NNCP for awhile but it's taken me this long to sit down and start working on it seriously! That was an interesting blog post you had. I had never really thought to use UUCP in a sneakernet way. I'm not Sergey, but I wouldn't say that he was wrong for sneakernet friendliness of UUCP. Your solution was not part of UUCP and involved quite a bit of work (even private mount namespaces, which aren't available on every platform that UUCP/NNCP uses). With NNCP it is just there. It doesn't need any particular configuration, just nncp-xfer and done. Plus the security model is already baked in and non-optional (ssh style). You are correct that NNCP could be used with rnews just as easily as UUCP. Sergey, you might correct that in the comparison table. Your comment about peers identification in UUCP - well I can see it both your way and Sergey's. It is true that UUCP itself doesn't directly have that support, but it is also true that uucico can be trivially run over a pipe to ssh, and authenticated that way. Perhaps a little more detail would be warranted there. By the way, although it is not necessary, NNCP can also be run over a ssh pipe. This can sometimes be useful if there is a pre-existing ssh infrastructure that penetrates firewalls, etc. See the addrs proxied example at http://www.nncpgo.org/Configuration.html#Configuration As a general matter, I am aware of only one feature that UUCP has which NNCP lacks: the ability to run across unreliable links (protocol g and friends, and PSTN). As someone that has worked to develop a clone of certain UUCP protocols for low-bandwidth radio links, I totally get why! However, I should certainly note that nncp-bundles can be *easily* sent across UUCP; just pipe the output via uux and have it pipe into nncp-bundle on the remote. So if you're dealing with oldschool modems, or unreliable radios, or whatever, you can still run UUCP at the communication layer and pipe NNCP bundles across it. The NNCP bundles, of course, carry the full encryption that NNCP uses, so additional encryption at the UUCP level would be unnecessary. By the way, if I might just add a bit of a comment, I found the tone of your email negative at places. NNCP has mostly a single author (not me!) and, like many free software projects, it all takes time. I would encourage you, in the future, to avoid complaining about software someone has provided for free. If you aren't sure how to do something, ask "how do I configure this for airgapped?" rather than complaining about the documentation. Then, write the documentation and submit a patch! I have done things this way quite a few times with Free Software projects and have found it to be well-received. I have maintained dozens of Free Software packages over the years, and I can attest to it being a thankless job. I try to open every communication with gratitude and openness -- gratitude that somebody wrote a thing that looks interesting, and openness that I may have missed something relevant. So, along those lines, I want to say thank you to Sergey for writing and maintaing NNCP, and also to you, for being interested in it and sending your message to the list. I am glad both of you are here. Thanks, John On Sat, Dec 26 2020, William Hay wrote: > I came across nncp recently and it seems interesting but the > documentation > could do with some improvement. > > http://www.nncpgo.org/UsecaseAirgap.html#UsecaseAirgap Says it > is about > using nncp via air gap but AFAICT only describes how to send via > a network > connected intermediate machine. No documentation, or even > example, > is given for configuring the intermediate machine to copy the > packets > to removable storage. > > http://www.nncpgo.org/Comparison.html#Comparison Says No for > sneakernet friendliness/UUCP while the commentary says this > requires more manual configuration. I set this up a few > years ago for myself and although there is a little setup > work once done it is about as automatic as sneakernet can > get. > https://www.dumain.com/posts/Forward_to_the_1970s_with_UUCP.../ > This could be more secure but my threat model doesn't involve > targetted > attacks so a little security throught obscurity sprinkled over > the > air gap seemed sufficient. I might replace it with NNCP if the > airgap > documentationwere better. > > Under News Transmission it says Yes for UUCP and No for NNCP. > The only > support UUCP has for news transmission is that if your news > system > supplies an rnews binary then it will be enabled for remote > execution > by default. AFAICT there is nothing to prevent enabling rnews > remote > execution over NNCP or configuring your news server to send > rnews batches > via NNCP (replace uux command in uucp recipies with nncp > equivalent). > > Also saying UUCP only supports PAP for peer authentication is > somewhat > misleading since, by tying each peer to a particular unix login, > it > can use whatever authentication your OS provides (most of my > uucp nodes > authenticate via ssh keys). > > > William ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-26 14:10 ` John Goerzen @ 2020-12-26 16:49 ` Sergey Matveev 2020-12-27 5:03 ` John Goerzen 0 siblings, 1 reply; 8+ messages in thread From: Sergey Matveev @ 2020-12-26 16:49 UTC (permalink / raw) To: nncp-devel [-- Attachment #1: Type: text/plain, Size: 3676 bytes --] Greetings! *** John Goerzen [2020-12-26 08:10]: >First of all, I was planning to send a message here in the next day or two >about this anyhow, but I'm working on a series of blog posts about NNCP. You >can see them at https://changelog.complete.org/archives/tag/asynchronous and >I've got several more planned, covering using NNCP for Exim, using NNCP to >handle both ZFS and non-ZFS backups, etc. Thank you for your post! Beeing the "ZFS-fan" too, I am waiting for your shared experience. >Your solution was not part of >UUCP and involved quite a bit of work (even private mount namespaces, which >aren't available on every platform that UUCP/NNCP uses). With NNCP it is >just there. It doesn't need any particular configuration, just nncp-xfer and >done. Plus the security model is already baked in and non-optional (ssh >style). Yeah, exactly that I tried to tell in my previous message there! I do not remember clearly, but possibly I decided to write my own UUCP for my needs after writing another similar kind of the shell script for sneakernet friendliness. That was too much :-) >You are correct that NNCP could be used with rnews just as easily as UUCP. >Sergey, you might correct that in the comparison table. Added to the TODO, will correct it in the nearest time. That comparison was written before "command exchanging" was available in NNCP. >As a general matter, I am aware of only one feature that UUCP has which NNCP >lacks: the ability to run across unreliable links (protocol g and friends, >and PSTN). As someone that has worked to develop a clone of certain UUCP >protocols for low-bandwidth radio links, I totally get why! Actually I have even started to write it, to run at least over COM-port. But it is not so trivial. Well, actually creating something like XMODEM of course is very simple, but one wish to use something like ZMODEM with scaling windows. I did not find the way to easily call and interact with lrzsz utilities for NNCP needs. And writing own complete implementation of "TCP"/ZMODEM/similar is challenging (to make it efficient). So currently I paused that work. Moreover literally two weeks ago I was trying UDT (https://en.wikipedia.org/wiki/UDP-based_Data_Transfer_Protocol) protocol, Tsunami UDP and other UDP-based protocols, for being able to saturate high-bandwidth/latency links, where TCP out-of-box may work pretty badly. But it also was not so trivial to deal with. Out-of-box UDT4 gave only 300-400 Mbps on 1Gbps LAN Ethernet link, much slower than ordinary TCP. So I also paused work on that direction. >However, I should certainly note that nncp-bundles can be *easily* sent >across UUCP; just pipe the output via uux and have it pipe into nncp-bundle >on the remote. So if you're dealing with oldschool modems, or unreliable >radios, or whatever, you can still run UUCP at the communication layer and >pipe NNCP bundles across it. The NNCP bundles, of course, carry the full >encryption that NNCP uses, so additional encryption at the UUCP level would >be unnecessary. That is very interesting use-case! However of course it is not full replacement for existing synchronization protocol (-call/-daemon) that will exchange higher priority packets first. >So, along those lines, I want to say thank you to Sergey for writing and >maintaing NNCP, and also to you, for being interested in it and sending your >message to the list. I am glad both of you are here. Thank you, John! I am also glad about feedback and interest. -- Sergey Matveev (http://www.stargrave.org/) OpenPGP: CF60 E89A 5923 1E76 E263 6422 AE1A 8109 E498 57EF [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-26 16:49 ` Sergey Matveev @ 2020-12-27 5:03 ` John Goerzen 2020-12-27 10:06 ` Sergey Matveev 0 siblings, 1 reply; 8+ messages in thread From: John Goerzen @ 2020-12-27 5:03 UTC (permalink / raw) To: Sergey Matveev; +Cc: nncp-devel On Sat, Dec 26 2020, Sergey Matveev wrote: >>I've got several more planned, covering using NNCP for Exim, >>using NNCP to >>handle both ZFS and non-ZFS backups, etc. > > Thank you for your post! Beeing the "ZFS-fan" too, I am waiting > for your > shared experience. I hope to have that posted in a few days! Things are busy here due to Christmas but having a more secure backup setup is definitely high on my list! [ snip ] >>As a general matter, I am aware of only one feature that UUCP >>has which NNCP >>lacks: the ability to run across unreliable links (protocol g >>and friends, >>and PSTN). As someone that has worked to develop a clone of >>certain UUCP >>protocols for low-bandwidth radio links, I totally get why! > > Actually I have even started to write it, to run at least over > COM-port. > But it is not so trivial. Well, actually creating something like > XMODEM > of course is very simple, but one wish to use something like > ZMODEM with > scaling windows. I did not find the way to easily call and > interact with > lrzsz utilities for NNCP needs. And writing own complete > implementation > of "TCP"/ZMODEM/similar is challenging (to make it efficient). > So > currently I paused that work. Yes, I know this feeling. I have been working on software for running over long-distance, low-power, low-bandwidth wireless links (think 10-30 miles / 15-50 km with <1W). I wrote https://github.com/jgoerzen/lorapipe for LoRA and https://github.com/jgoerzen/xbnet for XBee. I started work on a "reliable" layer to sit atop those, based on Taylor UUCP protocol i. I eventually abandoned it back in July, on the grounds that: - I don't have enough time to do this - I can just run PPP with VJ header compression across this thing and it's maybe less efficient but good enough. I was surprised that I couldn't find any general-purpose library or tool for doing this. ZModem & friends aren't general-purpose enough for what I want (and probably not for what you want either). ... and just now as I was writing that, I thought that I've never searched for "reliable framing protocol serial" and found https://github.com/BaroboRobotics/libsfp which I need to look into more. - John ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-27 5:03 ` John Goerzen @ 2020-12-27 10:06 ` Sergey Matveev 0 siblings, 0 replies; 8+ messages in thread From: Sergey Matveev @ 2020-12-27 10:06 UTC (permalink / raw) To: nncp-devel [-- Attachment #1: Type: text/plain, Size: 1848 bytes --] *** John Goerzen [2020-12-26 23:03]: >Yes, I know this feeling. I have been working on software for running over >long-distance, low-power, low-bandwidth wireless links (think 10-30 miles / >15-50 km with <1W). You know, *the most* impressive, the most delightful time in my life was using modems, COM-ports, BBSes and FidoNet. I really love all that technologies, all that magic. Unfortunately I deal only with ordinary modems (and bad telephone lines) and only read about *X.25 and similar things. Possibly that is just because I was young school pupil fascinated with everything related to computers. However that was beginning of 2000-s where BBS/FidoNet world mostly was considered dead. >- I can just run PPP with VJ header compression across this thing and it's >maybe less efficient but good enough. Same thoughts visited me too. When I connected my two server via COM-cable (FreeBSD 12.x, modern ones, Xeon-inside and so on :-)), I stayed with PPP setup -- simple and pretty good enough, especially on that network delays. >I was surprised that I couldn't find any general-purpose library or tool for >doing this. ZModem & friends aren't general-purpose enough for what I want >(and probably not for what you want either). Exactly! I was disappointed with that fact too. >for "reliable framing protocol serial" and found >https://github.com/BaroboRobotics/libsfp which I need to look into more. Well, creating just reliable framing protocol is not hard (XMODEM with better checksums is still here :-)), in my opinion. But doing that effectively with sliding windows, FECs and knowing that there are huge science work on all of that -- becomes much more complicated frightening task. -- Sergey Matveev (http://www.stargrave.org/) OpenPGP: CF60 E89A 5923 1E76 E263 6422 AE1A 8109 E498 57EF [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-26 10:25 Air Gap & News William Hay 2020-12-26 14:10 ` John Goerzen @ 2020-12-26 16:31 ` Sergey Matveev 2020-12-27 10:12 ` William Hay 1 sibling, 1 reply; 8+ messages in thread From: Sergey Matveev @ 2020-12-26 16:31 UTC (permalink / raw) To: nncp-devel [-- Attachment #1: Type: text/plain, Size: 3912 bytes --] Greetings! *** William Hay [2020-12-26 10:25]: >http://www.nncpgo.org/UsecaseAirgap.html#UsecaseAirgap Says it is about >using nncp via air gap but AFAICT only describes how to send via a network >connected intermediate machine. No documentation, or even example, >is given for configuring the intermediate machine to copy the packets >to removable storage. Well, there are so many ways how you can exchange packets with NNCP commands, that is would be huge documentation consisting only of examples. nncp-xfer, nncp-bundle, nncp-call/daemon and many ways to send that bundles (tapes, filesystemless disk, CD/DVD, oneway broadcasting channel (in theory, have not done in practice, and so on). nncp-xfer, for example, can be run manually, by some event when mass storage device is connected, by some cron checking routine and all of that also depends on OS/distribution (systemd, udev, devfs, etc). >http://www.nncpgo.org/Comparison.html#Comparison Says No for >sneakernet friendliness/UUCP while the commentary says this >requires more manual configuration. I set this up a few >years ago for myself and although there is a little setup >work once done it is about as automatic as sneakernet can >get. https://www.dumain.com/posts/Forward_to_the_1970s_with_UUCP.../ Although you can setup sneakernet between UUCP hosts, that does not mean it was designed to do so and has any kind of help of doing so. UUCP does not encrypt/authenticate transferred data -- but you can manually add gpg invocations to deal with that. UUCP does not split huge files on chunks -- you can freely do it manually with the "split" command. Actually there is no need to use UUCP/NNCP at all -- you can transfer files and pieces manually. That is why NNCP is "a collection of utilities simplifying ...". NNCP is just a collection of various helpers. UUCP does not contain any kind of help for dealing with non-online data exchanging. I can not find and remember where exactly I have asked about how to deal with removable storage and Taylor UUCP, but Ian Lance Taylor answered that UUCP was never intended to be used like that and the easiest possibility to transfer data by offline is just to copy spool directory contents. So obviously that won't work if another implementation is used on another node. You scripts on dumain.com URL are exactly that kind of helpers, *additional* utilities, but it is not the part of UUCP software and its intended use-case. >Under News Transmission it says Yes for UUCP and No for NNCP. The only >support UUCP has for news transmission is that if your news system >supplies an rnews binary then it will be enabled for remote execution >by default. This is mistake now. That comparison was written before NNCP have been able to execute any kind of commands -- initially it was hard-coded to use only sendmail. Will fix that comparison. >Also saying UUCP only supports PAP for peer authentication is somewhat >misleading since, by tying each peer to a particular unix login, it >can use whatever authentication your OS provides (most of my uucp nodes >authenticate via ssh keys). Do not agree. I have used UUCP for years with SSH transport, but that is literally UUCP-over-SSH. All that SSH commands are just wrappers, but UUCP still uses his own authentication. I can transparently add IPsec, TLS, but all of that are additions, wrappers, tunnels. I used UUCP for years over SSH. And was happy with it. But number of hacks, supporting scripts, additional tunnels (like ssh), need for gpg (for examples when moving spool directory on the removable storage around) were growing. I get tired of all of it and decided to write NNCP, where everything I want was out-of-box conveniently existing and working. -- Sergey Matveev (http://www.stargrave.org/) OpenPGP: CF60 E89A 5923 1E76 E263 6422 AE1A 8109 E498 57EF [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-26 16:31 ` Sergey Matveev @ 2020-12-27 10:12 ` William Hay 2020-12-27 10:52 ` Sergey Matveev 0 siblings, 1 reply; 8+ messages in thread From: William Hay @ 2020-12-27 10:12 UTC (permalink / raw) To: Sergey Matveev; +Cc: nncp-devel Thus spake Sergey Matveev: > Do not agree. I have used UUCP for years with SSH transport, but that is > literally UUCP-over-SSH. All that SSH commands are just wrappers, but > UUCP still uses his own authentication. I can transparently add IPsec, > TLS, but all of that are additions, wrappers, tunnels. That's your configuration not UUCP. The default behavior for Taylor uucico (literally what happens if you invoke it without any arguments) is to start in server mode without any AUTHN (no login prompt,no password prompt). The client gets to claim any system name it likes and you are reliant on uucp's AUTHZ (called-login) to check that the user invoking uucico is allowed to connect as that system. This mail is going over a link secured in this way with no passwords in sight. > > I used UUCP for years over SSH. And was happy with it. But number of > hacks, supporting scripts, additional tunnels (like ssh), need for gpg > (for examples when moving spool directory on the removable storage > around) were growing. I get tired of all of it and decided to write > NNCP, where everything I want was out-of-box conveniently existing and > working. Both NNCP and UUCP seem to fit nicely in the software-tools category and to be useful primarily when used with other software (MTA for e-mail etc). Exactly where to draw the line between built in and external tools is a matter of personal taste and what tradeoffs you want to make. Personally I think a lot of the issues with external tools can be solved adequately with a cookbook approach or adding a tool to generate cookie cutter configurations. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Air Gap & News 2020-12-27 10:12 ` William Hay @ 2020-12-27 10:52 ` Sergey Matveev 0 siblings, 0 replies; 8+ messages in thread From: Sergey Matveev @ 2020-12-27 10:52 UTC (permalink / raw) To: nncp-devel [-- Attachment #1: Type: text/plain, Size: 1110 bytes --] *** William Hay [2020-12-27 10:12]: >The default behavior for Taylor >uucico (literally what happens if you invoke it without any arguments) >is to start in server mode without any AUTHN (no login prompt,no password >prompt). That is right. So agreed that actually no authentication is done at all that way, just identification. But anyway there is no way to securely authenticate UUCP without external tools (except for physically secure or isolated links of course). UUCP was written before any cryptography started to be used on ordinary computers :-) >Exactly where to draw the line between built in and external >tools is a matter of personal taste and what tradeoffs you want to make. Agreed. And I think it is even funny that personally I am the fan "Unix-way", DJB's simple approaches, its daemontools, redo and similar, but NNCP is far away from being Unix-way utility, containing even files splitting, tar-ing and even compression builtin. Tradeoffs are everywhere. -- Sergey Matveev (http://www.stargrave.org/) OpenPGP: CF60 E89A 5923 1E76 E263 6422 AE1A 8109 E498 57EF [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-27 10:52 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-12-26 10:25 Air Gap & News William Hay 2020-12-26 14:10 ` John Goerzen 2020-12-26 16:49 ` Sergey Matveev 2020-12-27 5:03 ` John Goerzen 2020-12-27 10:06 ` Sergey Matveev 2020-12-26 16:31 ` Sergey Matveev 2020-12-27 10:12 ` William Hay 2020-12-27 10:52 ` Sergey Matveev