On 23/06/2020 06:34 pm, R.Wieser wrote:
> Hello all,
>
> I've got a few computers in seperate subnets which I do not allow to
> communicate with each other.
> When I need to transfer data between computers in those subnets I use an USB
> stick.
>
> Somehow my thoughts went to if it would be possible to use an RPi 3B+ as a
> kind go-between.
>
> The first problem would be that I would need to add another (or more)
> ethernet connection (so the 'puters on one subnet cannot reach 'puters on
> the other one). Is that at all possible (at a usable speed) ?
>
> The second would be to how to transfer data from one subnet to the other.
>
> For that I could imagine a kind of "post office" solution, where 'puters on
> both subnets can leave messages for each other and ofcourse read each others
> replies, but never directly talk to each other. (both 'puters connect to a
> known port on the RPi).
>
> Does anyone know if such a sulution or project (and tutorial?) for such a
> thing exists ?
>
> Regards,
> Rudy Wieser
>
>
There is a loadable module included with the bash source called
'accept'. It's help says:
accept: accept [-t timeout] [-v varname] [-r addrvar ] port
Accept a network connection on a specified port.
This builtin allows a bash script to act as a TCP/IP server.
Options, if supplied, have the following meanings:
-t timeout wait TIMEOUT seconds for a connection. TIMEOUT may
be a decimal number including a fractional portion
-v varname store the numeric file descriptor of the connected
socket into VARNAME. The default VARNAME is ACCEPT_FD
-r rhost store the IP address of the remote host into the shell
variable RHOST, in dotted-decimal notation
If successful, the shell variable ACCEPT_FD, or the variable named by
the -v option, will be set to the fd of the connected socket, suitable
for use as 'read -u$ACCEPT_FD'. RHOST, if supplied, will hold the IP
address of the remote client. The return status is 0.
On failure, the return status is 1 and ACCEPT_FD (or VARNAME) and RHOST,
if supplied, will be unset.
The server socket fd will be closed before accept returns.
Could this be what you're looking for? Implementation is left as an
exercise for the reader. I can't find any info about it on the web
(cursory look).
--
Chris Elvidge, England
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|