From owner-freebsd-net@freebsd.org Thu Jun 14 14:29:42 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 492881009140 for ; Thu, 14 Jun 2018 14:29:42 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D92116D189 for ; Thu, 14 Jun 2018 14:29:41 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: by mail-io0-x243.google.com with SMTP id t6-v6so7312414iob.10 for ; Thu, 14 Jun 2018 07:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tdZR6ks5ajEqO5qSrBM//ovrmgKUNyFtqPThUrySE6U=; b=R+W+yECdLrbmFgA/kUFZ9YRk7bsXqvVXfVXY522X9fgcjUdBNy7irXr8qKpe3xOOqF aucYg22Hmv3nVB56TMx93zhglBH+KlNWnwDPonSeLatoxZ6NsdACJpijdp5imhj5yOM1 7FR4TeKHGgJDxXt9aCTCYwLI8QlYsYbL4J5kxmoJzpW+hayZGROyzyi4RYRKfOC59imw D4cgZgwdNmEGDn7DSd1GYsF1mfOGsixP1yKjnN4GOECxm05tFLOCVW33P5N8hPXYIgHX mb5PxlLbr47v5x47KlFm5lELIz1Da2ETj1Akxv27nOAH4L8aXeflHHEAZZF6ApyULqAU wq/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tdZR6ks5ajEqO5qSrBM//ovrmgKUNyFtqPThUrySE6U=; b=ZKfSLh573Gaa9dYZSu6ItCBcCAcfv8fII+rhe3K54zo0fCkLWaOsT5n6CIXYOXKVzc xecTX0h5tyZeghUn+QaveSr/nVHChNWhlMtiLkn3qOmAXmElKIBIQVtPKXufsH9J160o V7G3hZdvDs9rzThnY2Kj2c9t0wEPJwRUKsudvkk0sX4kptnd/iMqdAp9enQ+4rRei1iL JJe4H6m8gsThPySkR2FR6bG46SkSTPv6qL6iGNeWEBDYyG8H1L9zzijA0hHHc8raqjQB vLYLVlnZew4RLNG85Sr2C+tQ6XT8xBHt6GmYX7eiPFnVEcXUqmR4K7/PMl10gvySPWV5 kwEg== X-Gm-Message-State: APt69E0nV06HR58ZJScJ4mhZXWCrbmko8XYt4IJb7lkq2ZfhuLIGNV7u G/nMRa+qVyoldKyPeQEbzTd+6ZZ1TX+t46VuAXe1Xg== X-Google-Smtp-Source: ADUXVKKHjhGa8lFxIyITzbnVGKcS8WAe8q6ZrXw8QuZjxhBXK4m5HL7U+qVjiIznJ/2RsPrdm6MjjN9BDe4PtMMP0pk= X-Received: by 2002:a6b:8b54:: with SMTP id n81-v6mr2327975iod.229.1528986581163; Thu, 14 Jun 2018 07:29:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8d5c:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 07:29:40 -0700 (PDT) In-Reply-To: References: <2346bc5f-1ca3-3b6a-ac1a-c496e94eb969@netfence.it> <40qGSP6TW1z5BbC@baobab.bilink.it> <8a9d5799-5451-7f0a-cbd7-64728ab8ae85@netfence.it> From: Adam Date: Thu, 14 Jun 2018 09:29:40 -0500 Message-ID: Subject: Re: Proxy a TCP connection To: Andrea Venturoli Cc: freebsd-net Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 14:29:42 -0000 On Thu, Jun 14, 2018 at 9:01 AM, Andrea Venturoli wrote: > On 05/21/18 18:10, Andrea Venturoli wrote: > > Thanks to anyone who answered. >> >> I'm currently trying net/bounce, as suggested by Eugene. >> If that won't work properly, I'll sure give plugdaemon a shot. >> > > Just an update in case anyone is interested... > > Bounce is still dying occasionally; in some way it is better than > tcpproxy, in that it uses different process, one for each port, so when one > dies, the other ports will still work (when tcpproxy dies, all port > redirections stop working). > > I still haven't managed to understang why it dies: really no clue is in > the log... > It's always the same port (same device) and once I had to tcpdrop a > FIN_WAIT2 connection in order to be able to restart it. > > Guess I'll have to get daemontools' svscan out again. > haproxy or nginx can do tcp proxy/lb. I haven't used nginx for that exactly but here's your doc: https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/ -- Adam