Article View: bit.listserv.openbsd-pf
Article #104Re: synproxy and RST (non-listener)
From: Nerius Landys
Date: Sat, 23 Oct 2010 07:32
Date: Sat, 23 Oct 2010 07:32
48 lines
3654 bytes
3654 bytes
>> Maybe ask the operating system if the port is "bound" before completing >> the handshake with the client, otherwise send RST to the client? > > askin before isn't possible. you do not know that the backend will > accept a connection based on a previous connection being accepted. and > doing a check before replying with a syn defeats the prupose anyway. Thanks for the reply. But I don't _completely_ understand. I don't know too much about operating system calls, but let's say that I have a program that is bound to TCP port 8080 on my local machine (same machine that is running the pf in question). Let's say I launch another program that tries to listen on this port as well. Of course it will fail with "cannot bind to port" or something like that. So there _is_ something the operating system tells us regarding a port being bound on the local system, and this [presumably] does not require any packets to be sent. Could we do a similar check before completing a handshake with a client via synproxy? OK I may already know the reason why this isn't an elegant idea, and correct me if I'm wrong. The synproxy could be proxying a connection to another host (meaning my service listening on port 8080 is running on a _different_ host than the pf machine). For example, let's say pf is configured to forward port 8080 to an internal machine (like 192.168.0.2) that is running a service on port 8080. Then, there is no way of predicting whether there is a service running on port 8080 on that internal machine. Am I thinking along clear lines here or am I missing something? And thank you for all your answers. By the way I think this mailing list is kind of dead because it's near impossible to get subscribed to it. I had to try really really hard to get subscribed; I wasn't able to do it from my Gmail account for example, and just following the online instructions wasn't sufficient to get subscribed even with _this_ account. If you guys care about getting more subscribers to this list, you might want to follow the direction here: http://www.benzedrine.cx/mailinglist.html and double check that things work correctly (for example little things like omitting the subject line in the email to subscribe will reject the email, also I think you need to send an email to a majordomo or something; I actually forget the steps needed to get subscribed, but it was very difficult indeed). I hope you "guys" (by "guys" I most likely mean "one or two of you, the ones who have been very helpfully replying") don't mind all of my questions. In fact I have 2 more pf questions (answers to which I am unable to find anywhere on the internet), and unless you object I would like to send out 2 more emails with those questions at some point in the future.
Technical Details
Message-ID:
<Pine.LNX.4.63.1010230230240.13500@roadrunner.metaflex.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrnReferences:
<20101020204241.GC9856@nudo.bsws.de>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!g2news1.google.com!news1.google.com!npeer02.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: 23 Oct 2010 00:32:42 -0700 Organization: None Lines: 48 Message-ID: <Pine.LNX.4.63.1010230230240.13500@roadrunner.metaflex.com> References: <20101020204241.GC9856@nudo.bsws.de> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed NNTP-Posting-Date: 23 Oct 2010 07:32:42 GMT