From owner-freebsd-questions@FreeBSD.ORG Tue Aug 27 21:21:57 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD1C1EDB for ; Tue, 27 Aug 2013 21:21:57 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98A072382 for ; Tue, 27 Aug 2013 21:21:57 +0000 (UTC) Received: by mail-pd0-f174.google.com with SMTP id y13so5380579pdi.19 for ; Tue, 27 Aug 2013 14:21:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=5JvWLnf3lJ7toeQn6FLlfEHviRGAER8EBLObOIhRsVA=; b=mjZxtic7Nr8cqMPAIyYZzpb6LzO91A5qsc1/MvAUixzok1S+mzBOY0xyrfJ4tOnHp6 NLV9pE7IbUY/f5OP0AIMYRW1rrA/xK0k3tQ1MfVg8YaEBeXzlLU0cEpXYJoZXnFSIDBU ISs7D06BCj1rCxlGaG7Uc3xHigFF4qpR28kKYSf7D91kkeLheP5dgRvck2Y7x4nFGyYZ JBfea8Y/3j+nCHFquCxe3JjBRjDKfkqcU0Pa4FUhLtjQdzouopLluPUuV+fIonzOlMhn CYYCg4uJ889w5dnpn9mobUgCNFyUTK9Ts9LCZ+8sKKoFuY5ydc811SJw4Fno0KEVPjhU dCsA== X-Gm-Message-State: ALoCoQmTS8sDsp4mHTPQr3qu+6Jqc4GZ3iLsgvbNl0Kyk/bYAqVIXwxejpKgCbS3VBkiI3mxKioJ MIME-Version: 1.0 X-Received: by 10.68.58.97 with SMTP id p1mr11695114pbq.144.1377638511694; Tue, 27 Aug 2013 14:21:51 -0700 (PDT) Received: by 10.66.240.5 with HTTP; Tue, 27 Aug 2013 14:21:51 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Aug 2013 17:21:51 -0400 Message-ID: Subject: Re: Jail with public IP alias From: Alejandro Imass To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 21:21:57 -0000 On Tue, Aug 27, 2013 at 4:59 PM, Alejandro Imass wrote: > Hi, > > I have a machine with several public IPs on the same NIC and I bound > one of those IPs to a jail created with EzJail. Suppose the scenario > is something like this: > > em0 > 190.100.100.1 > 190.100.100.2 > 190.100.100.3 > 190.100.100.4 > > In the jail we are bound only to 190.100.100.4 > > The default router is correctly set on the jail, etc. > > But when we ssh out of that jail, or send an email, the receiving end > always sees 190.100.100.1 not 190.100.100.4 which is the IP the jail > is bound to. I think my problem is actually more basic than this. The problem actually occurs on the base system as well and I think it's because all the IPs are on the same subnet, then the kernel assumes to use the primary IP as the source address. For the sake and usefulness of the mail archives I will end this thread here and start another one with a more appropriate title, not before researching to see if this can be done with the routing table or if I need to use ipfw to re-write the source address. Thanks, -- Alejandro Imass