From owner-freebsd-security@FreeBSD.ORG Mon Sep 26 07:55:24 2005 Return-Path: X-Original-To: freebsd-security@freebsd.org Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5AD716A429 for ; Mon, 26 Sep 2005 07:55:24 +0000 (GMT) (envelope-from carlopmart@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BF8343D48 for ; Mon, 26 Sep 2005 07:55:24 +0000 (GMT) (envelope-from carlopmart@gmail.com) Received: by zproxy.gmail.com with SMTP id 13so273397nzp for ; Mon, 26 Sep 2005 00:55:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=LM6ApJBm1iynOSgM94ofC57pa6rn1i200HBWVW0OgBrl/xxehDmTvT37DC7/x3mV0UCFT8df/t21wIuIV/V6R+FvEyshNeTjVFYm755DreT9GIxz81In/PF+EhfpCTrYkrN0U8EVOxfJa5e8S6QtdKmZ2ZnjR/6zxinbHvB1Iac= Received: by 10.54.130.6 with SMTP id c6mr1423135wrd; Mon, 26 Sep 2005 00:55:23 -0700 (PDT) Received: from ?10.10.10.206? ( [62.22.178.217]) by mx.gmail.com with ESMTP id g3sm235732wra.2005.09.26.00.55.22; Mon, 26 Sep 2005 00:55:23 -0700 (PDT) Message-ID: <4337A962.6020600@gmail.com> Date: Mon, 26 Sep 2005 09:55:14 +0200 From: "carlopmart@gmail.com" User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050912) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: freebsd-security References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Encrypt some services with ipsec X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 07:55:25 -0000 Thank you bigby!!!!. Bigby Findrake wrote: > On Sat, 24 Sep 2005, carlopmart@gmail.com wrote: > > >>Hi all, >> >> I have two prodction servers with FreeBSD 5.4 (all security patches >>are applied). They running some services like dns, ssh, http, ftp, etc. >>But I woukd like to encrypt some services for some hosts with ipsec when >>it is accessed. For example: >> >> - DNS resolution: not encrypted. >> - DNS replication master-slave: encrypted by ipsec. >> - Telnet: encrypted by ipsec for some hosts. Deny for the rest. >> - SSH: not encrypted for some hosts, encryted by ipsec for the rest. >> - FTP: encrypted by ipsec. >> - HTTP: encrypted by ipsec. >> >> is it possible to encrypt only certains services under ipsec tunnel?? > > > Someone please check my work. > >>From the man page on setkey, it looks like you can specify ports for the > security policies, so you could specify certain ports to encrypt, and not > specify a blanket/default host-to-host policy for all other traffic, so > that all other unspecified traffic is unencrypted. > > For example: > > ---------------------BEGIN /ETC/IPSEC.CONF------------------------------- > # > # encrypt all dns traffic between master host A (1.1.1.1) slave host B > # (1.1.1.2) > spadd 1.1.1.1 1.1.1.2[53] any -P out ipsec esp/transport//use; > spadd 1.1.1.2[53] 1.1.1.1 any -P in ipsec esp/transport//use; > > spadd 1.1.1.1[53] 1.1.1.2 any -P out ipsec esp/transport//use; > spadd 1.1.1.2 1.1.1.1[53] any -P in ipsec esp/transport//use; > > # > # encrypt telnet traffic between server A (1.1.1.1) and client C (1.1.1.3) > spadd 1.1.1.1[23] 1.1.1.3 any -P out ipsec esp/transport//use; > spadd 1.1.1.3 1.1.1.1[23] any -P in ipsec esp/transport//use; > > # > # encrypt http traffic between server A (1.1.1.1) and client D (1.1.1.4) > spadd 1.1.1.1[80] 1.1.1.4 any -P out ipsec esp/transport//use; > spadd 1.1.1.4 1.1.1.1[80] any -P in ipsec esp/transport//use; > > # > # and all other traffic is unencrypted. > ---------------------END /ETC/IPSEC.CONF------------------------------- > > > > /-------------------------------------------------------------------------/ > I used to hate weddings; all the Grandmas would poke me and > say, "You're next sonny!" They stopped doing that when i > started to do it to them at funerals. > > finger://bigby@ephemeron.org > http://www.ephemeron.org/~bigby/ > news://news.ephemeron.org/alt.lemurs > /-------------------------------------------------------------------------/ > > -- CL Martinez carlopmart {at} gmail {d0t} com