From owner-freebsd-jail@freebsd.org Wed Dec 14 10:43:39 2016 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5758FC7781A for ; Wed, 14 Dec 2016 10:43:39 +0000 (UTC) (envelope-from marcel.plouf@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 3598D167E for ; Wed, 14 Dec 2016 10:43:39 +0000 (UTC) (envelope-from marcel.plouf@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 3226EC77819; Wed, 14 Dec 2016 10:43:39 +0000 (UTC) Delivered-To: jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FF3EC77818 for ; Wed, 14 Dec 2016 10:43:39 +0000 (UTC) (envelope-from marcel.plouf@gmail.com) Received: from mail-wj0-x241.google.com (mail-wj0-x241.google.com [IPv6:2a00:1450:400c:c01::241]) (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 B976A167D for ; Wed, 14 Dec 2016 10:43:38 +0000 (UTC) (envelope-from marcel.plouf@gmail.com) Received: by mail-wj0-x241.google.com with SMTP id j10so3723928wjb.3 for ; Wed, 14 Dec 2016 02:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bXsF7YXU95QDxuflsVeBnxHPW4ScmbnMImYsBEpMHxE=; b=Ch54r8nu1Se2weosHiC3lha4ZItZTTtdBj1g4Mo0xC+d9NdGl5DVicw4XdmOWrU7Eg JVUIe7liN1Q+WWc4sBJR7UwJhuM30UlW63ownHG+RNzvD8S9etPTZzpgypJkdGg0WJfN ZSiL1Mt1riuHDX8YLz0YcsfuKLisAGl63ZF+Bx3fYc0AB9PUa1+0H9GKtiHkG+KykuFo ov4SNLRTsCTm9nf3g2PYIxtaASERfFzZBTjcyvh67iLMEOf14U+MR42fQrJizdG0wLxh mCZJ7Yg+B7+Aj1ntDST2xvpkbfZkGI73kUlTr+khPFRkyfR1T/i6V9W5SZt7QUV3uxxZ /4Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bXsF7YXU95QDxuflsVeBnxHPW4ScmbnMImYsBEpMHxE=; b=EAfWW85Wh/XCWf18GM1ntDttNWqyIUkewcawRSxuvper99i9LCFbtaTHtqNeBOCuls LzecMEVv9gTSWSonX0zbh7dx9QfY/A4u4L3tRCxoHBdisbDXNKFJmuzoDNLRJhoPVCpG Y1r+94nABehDJ7MhWowNduOnY9barASFNk68xRxK1X5RwPjsGEN0VYvEvbN/IEea69iF 3Oty4tDHasLnfGLuv3VfE4nqaLnSajnNABFQfKMuiN96IMTWGhh/oQY5cK5lh3Tg+HEu vWnWjA0mMjiUc7PnrIVI3yrkWjEbN+mT3cuKYC37ydsggQk0Xs8hG84xHdZDeL7h18jo SSMA== X-Gm-Message-State: AKaTC02WnW/yO/PIIlshdNqHQqwfrJ0i6QGxFBsb3AmiKp6l5OTPc9yP8Wx4nNciBn+enQ== X-Received: by 10.28.211.72 with SMTP id k69mr6251019wmg.137.1481712217093; Wed, 14 Dec 2016 02:43:37 -0800 (PST) Received: from marcel-laptop.lan (85-171-136-71.rev.numericable.fr. [85.171.136.71]) by smtp.gmail.com with ESMTPSA id x5sm66550659wje.36.2016.12.14.02.43.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Dec 2016 02:43:36 -0800 (PST) Date: Wed, 14 Dec 2016 11:42:39 +0100 From: marcel To: Ernie Luzar Cc: jail@freebsd.org Subject: Re: Closing ports in jail with ipfw Message-ID: <20161214114239.60b7fb48@marcel-laptop.lan> In-Reply-To: <5844B557.7050304@gmail.com> References: <20161117233607.3430afd4@marcel-laptop.lan> <5844B557.7050304@gmail.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 10:43:39 -0000 Le Mon, 05 Dec 2016 08:31:19 +0800, Ernie Luzar a =C3=A9crit : > marcel wrote: > > Hi there, > >=20 > > I've created a jail and when I do a nmap on his IP, I can see that > > port 25 and 22 are open but I don't want. So i've tried to create > > an IPFW rule by adding 'ipwf -q add 00290 deny all from router to > > jail' to my host ipfw conf file and applied it but ports jail are > > still open. How can I close or open the ports of my jail ? > >=20 > > Thanks ! =20 >=20 > You can not run nmap on the host targeting the jails ip. Doing so > only shows you open ports on the host. You have to run nmap from a > computer on a different public ip address targeting the public ip > address assigned to the jail. If jail is using a non-routeable ip > address, nmap is useless in looking for jail open ports. Hi ! Sorry for silence, I was not able to answer. Yeah I understand, maybe netstat -an in jail is more useful ? When I do that I see port 25 and 514 are open but if I haven't looked yet what is this port 514 I imagine both of these ports are not closable (or it's not advised)=20 isnt'it ?=20