9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Romano <unobe@cpan.org>
To: 9front@9front.org
Subject: [9front] DNS/ICMP via sshnet(4) or drawterm
Date: Tue, 03 Oct 2023 14:28:54 -0700	[thread overview]
Message-ID: <F6D5307521042864E3289552B50CF204@smtp.pobox.com> (raw)

Hi y'all,

I'm interested in getting DNS/ICMP working over sshnet(4) or
drawterm and want to get feedback to make sure it's not a fool's
errand. A simple 'No.' would suffice.

First, I saw that drawterm provides /mnt/term/net/udp/, and so
attempted to do the following within drawterm as a proof-of-concept,
to see if I could use drawterm instead of sshnet:
	bind /mnt/term/net /net echo -n INTERNAL_DNS_SERVER >
	/env/DNSSERVER ndb/dnsgetip INTERNAL_HOST_NAME
but get:
	ndb/dnsgetip: INTERNAL_HOST_NAME: dns failure: server failure
I thought that kern/devip-posix.c would have properly passed on udp
packets.  So my first question is: has anyone has done something like
this using drawterm, and if so, how?

(If my understanding is correct, drawterm would be sending everything
over 9p, which adds another layer than just using sshnet(4), but might
not make a difference immediately if I'm just trying for DNS)

Re: sshnet(4), it'd be more complicated because the different
solutions I've seen on linux hosts use socat and nc to start listening
on a specific port on the remote host, then set up a pipe between the
tcp-over-ssh port to whatever udp host and port on the remote host's
side.  So by necessity, sshnet(4) would have to do something similar.
My initial thought is to use ssh(1) to execute port listening on
remote host that would then send to a specific udp port/host.  So
maybe something like:

1.  Add a flag to sshnet(4) called -u, which specifies a script to
call using ssh(1) on the same remote host to setup tcp-over-udp port
forwarding.

2.  The script would be mere commands to run on the remote host, so
could be targeted based on the remote host.

3.  The command on the remote host would be executed to implement the
UDP messages described in ip(3) (i.e., the script would handle the
ctl, data, err, etc.  messaging).

For the script, a stock one might be provided at some point for common
remote host OSes/setups.  Does something like that look practically
feasible?


             reply	other threads:[~2023-10-03 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 21:28 Romano [this message]
2023-10-03 22:42 ` ori
2023-10-03 23:02   ` unobe
2023-10-04  1:04     ` ori
2023-10-04  1:14       ` unobe
2023-10-04  8:35         ` hiro
2023-10-27 11:28     ` mkf9
2023-10-27 13:59       ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F6D5307521042864E3289552B50CF204@smtp.pobox.com \
    --to=unobe@cpan.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).