🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.openbsd-pf
Article #102

Re: synproxy and RST (non-listener)

#102
From: Nerius Landys
Date: Wed, 20 Oct 2010 20:40
19 lines
1995 bytes
> Is there a way to get synproxy to send the RST (I _think_ that's what it
> is called) when no service is running on that port?  Or is this a feature?
> Or is there a reason it behaves this way?  Intentional, bug, oversight,
> or missing modifier to my rule?

Hrm I think, after doing a little bit more research, I understand why this
isn't possible.  Maybe you can tell me if I'm right.  Seems that
synproxy completes a TCP connect handshake completely with the client
before even sending anything to the actual service it's proxying.
This is the whole purpose of synproxy.  So, it has a completed handshake,
the client thinks he's "connected", and pf tries to "connect" to the
underlying service, but receives an RST or whatnot, which means
the service isn't running.  It's probably too late to send an RST
to the client at this point, so pf just lets the connection from the
client "hang".

I suppose there's not way to get around this problem...  Any thoughts?
Maybe ask the operating system if the port is "bound" before completing
the handshake with the client, otherwise send RST to the client?
Technical Details
Message-ID: <Pine.LNX.4.63.1010202258110.30642@roadrunner.metaflex.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrn
References: <Pine.LNX.4.63.1010202201390.29542@roadrunner.metaflex.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: bffa70e3,5f9bda23cab0e01d
X-Google-Attributes: gidbffa70e3,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrn
From: landys@nerius.com (Nerius Landys)
Newsgroups: bit.listserv.openbsd-pf
Subject: Re: synproxy and RST (non-listener)
Date: 20 Oct 2010 13:40:02 -0700
Organization: None
Lines: 19
Message-ID: <Pine.LNX.4.63.1010202258110.30642@roadrunner.metaflex.com>
References: <Pine.LNX.4.63.1010202201390.29542@roadrunner.metaflex.com>
NNTP-Posting-Host: localhost
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
NNTP-Posting-Date: 20 Oct 2010 20:40:02 GMT