From: Jacob Moody <moody@posixcafe.org>
To: 9front@9front.org
Subject: Re: [9front] WANTED: ip based filtering of incoming connections
Date: Thu, 25 Jul 2024 23:17:49 -0500 [thread overview]
Message-ID: <83303850-bd8e-4005-b425-8894b04b9d17@posixcafe.org> (raw)
In-Reply-To: <59C872D9DD7DD16FBA1D5353DB506C7D@gaff.inri.net>
On 7/25/24 22:57, sl@stanleylieber.com wrote:
>>> Did you verify it was working with just a single ip address or two? I
>>> am thinking perhaps you ran in to some arbitrary buffer limit.
>>
>> even with only one ip address it has no effect.
>
> the while loop seems useless. if i run this on the command line and never
> interrupt it, it just keeps going, and continues to block connections from
> this one ip:
>
> ; aux/dial 'ipmux!vers=4;src=168.235.81.125&255.255.255.255' >/dev/null
>
> but the original problem i reported still holds true: if i fork it to the
> background by placing an & at the end of the line, it exist immediately.
>
> and you're right, even just running it on the command line and not
> interrupting it, with a longer list of ip addresses, it has no effect:
>
> ; aux/dial 'ipmux!vers=4;src=47.128.0.0&255.252.0.0|52.230.152.0&255.255.255.0|64.249.68.0&255.255.255.0|64.249.79.0&255.255.255.0|64.249.83.0&255.255.255.0|85.208.96.0&255.255.255.0|156.59.198.0&255.255.255.0|168.235.81.125&255.255.255.255' >/dev/null
>
> it never exits, it just doesn't seem to do anything.
>
> sl
Sorry, my memory betrayed me here and I got all sorts of things wrong.
Testing things myself I see the same behavior you see, so forget the rc loop.
The issue with dial exiting immediately when backgrounded is because it reads stdin,
if you pass dial a -e flag it will ignore stdin and & will work as intended.
As for the large lines not working, /sys/src/libc/9sys/dial.c has some hard coded
limits and a quick scan makes me think we're capped at Maxstring (128).
Sorry,
moody
next prev parent reply other threads:[~2024-07-26 4:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 21:56 Stanley Lieber
2024-07-25 22:08 ` B. Atticus Grobe
2024-07-26 0:34 ` Stanley Lieber
2024-07-26 0:47 ` Jacob Moody
2024-07-26 1:55 ` sl
2024-07-26 1:58 ` Jacob Moody
2024-07-26 2:00 ` sl
2024-07-26 3:36 ` sl
2024-07-26 3:43 ` Jacob Moody
2024-07-26 3:47 ` sl
2024-07-26 3:57 ` Jacob Moody
2024-07-26 3:57 ` sl
2024-07-26 4:17 ` Jacob Moody [this message]
2024-07-26 3:54 ` Romano
2024-07-26 4:02 ` sl
2024-07-26 4:13 ` Romano
2024-07-26 4:20 ` Romano
2024-07-26 4:44 ` Stanley Lieber
2024-07-26 5:14 ` Romano
2024-07-26 23:15 ` Jacob Moody
2024-07-26 23:47 ` sl
2024-07-27 0:20 ` sl
2024-07-27 0:34 ` Jacob Moody
2024-07-27 0:49 ` sl
2024-07-27 1:18 ` sl
2024-07-25 22:10 ` Jacob Moody
2024-07-25 22:33 ` Steve Simon
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=83303850-bd8e-4005-b425-8894b04b9d17@posixcafe.org \
--to=moody@posixcafe.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).