From owner-freebsd-questions@freebsd.org Fri Jul 14 14:34:53 2017 Return-Path: Delivered-To: freebsd-questions@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 F0720DA3129 for ; Fri, 14 Jul 2017 14:34:53 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 88ADF67B66 for ; Fri, 14 Jul 2017 14:34:53 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm0-x231.google.com with SMTP id i127so24636249wma.0 for ; Fri, 14 Jul 2017 07:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=aHonkdBt1fVpWhIt/knY3gwhC8FHgjLJ0ll1wYW74kk=; b=bLQfyaDqf4blljfoqqqG8L5Rd3CigRBIIMyda44AbpduQ+fJYsdidKprzXWcuYZbG5 RiKrRL1STLB5pXe87bZhc3ksuRYdrscS0zihufPY865Q9RH2ugQ7kJuBLCBfbbS3hwMR cv8q4PUDMqDzNQjPYEXKu2pzDrpea8Vqc/SEp+REEVlJ6PEsPhayfJaAeREtXGtgxx+i 02lLRAdc3jDBBTPmn0pTWg1jhTwmJxEXy09cv7o91r6b2nYbjGUni4n3qu/ZkYb7Gas3 5v8yKXrSyzL9lFfdfHRojTVRSMi3QF4tpqnQjSDvK4787ZJkudZgyyc4liZfNNTcZQNl 7Cpw== 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:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aHonkdBt1fVpWhIt/knY3gwhC8FHgjLJ0ll1wYW74kk=; b=eat5QsPx41+2TknLl64ric9VKA//UdSBlXp9/q2ZJ8S5IaJ7+Kimf/CjlRmJsxZJpd 0BNRDTQeBbVNl0sf6S+Q6dp56ImPGYFzgdFJ+iYqk9U2SMURMPmVwIn+3h2z590uAO5O GAWNmya2gOhhKz2sJ5WoLpgBgYr8dcyUUDTqRj3+yX/VqushtQ6qkTU2jzNwBZbVYjph WB3sJCI3PC2UC/HiZMFGBiQMYr8ENHSLkb8oIC9Awz44U7rUx1kC9XrPXsnuR9N5vaIw DScBHetGwYvbumb09wmO8FYAZ75MJGB4QAzYqExyA4+iwIIkRCz4RXnFDJ9DeERSoilC Elpw== X-Gm-Message-State: AIVw111CulGVkcvz4Z6ZltqtI9Vw73Uiy2fjFfcl7wbjDpedvdPbptej 4ijqwz5DaKdddGFZ X-Received: by 10.28.74.14 with SMTP id x14mr3085399wma.15.1500042891737; Fri, 14 Jul 2017 07:34:51 -0700 (PDT) Received: from gumby.homeunix.com ([81.17.24.158]) by smtp.gmail.com with ESMTPSA id p99sm8338653wrb.6.2017.07.14.07.34.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jul 2017 07:34:49 -0700 (PDT) Date: Fri, 14 Jul 2017 15:34:46 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: Unable to set rule using service name Message-ID: <20170714153446.1fa4241e@gumby.homeunix.com> In-Reply-To: <20170714145347.40401bf7@gumby.homeunix.com> References: <20170714145347.40401bf7@gumby.homeunix.com> X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; amd64-portbld-freebsd10.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 14:34:54 -0000 On Fri, 14 Jul 2017 14:53:47 +0100 RW wrote: > On Fri, 14 Jul 2017 16:43:56 +0530 > Kulamani Sethi wrote: > > > Hi, > > I want to set a rule for a particular service URL which running on a > > remote server. > > I know the IP but don't know the port number where that service is > > running. If i set rule for IP then it will applied for entire > > services running over there. > > > > There is a option in IPFW rule we can set either port number or > > name, but it does not accepting using name. Here is a example for > > my case. > > > > suppose URL for test1 service http://x.x.x.x/test1 > > URL for test2 service http://x.x.x.x/test2 > > > > I tried a rule, "ipfw add 104 deny log ip from x.x.x.x test1 > > test1 and test2 aren't port numbers, the port number here is 80 for > http I didn't put that very well. The name that you can use in place of a port number is the name of a protocol that uses that port, in this case "http". The name has to be defined in /etc/services