From owner-freebsd-ipfw@freebsd.org Tue Jul 11 13:48:11 2017 Return-Path: Delivered-To: freebsd-ipfw@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 B5ECCDA0142 for ; Tue, 11 Jul 2017 13:48:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3D3274806 for ; Tue, 11 Jul 2017 13:48:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6BDmBDq069634 for ; Tue, 11 Jul 2017 13:48:11 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ipfw@FreeBSD.org Subject: [Bug 104682] [ipfw] [patch] Some minor language consistency fixes and whitespace nits Date: Tue, 11 Jul 2017 13:48:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 6.2-PRERELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jpaetzel@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Rejected X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-ipfw@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2017 13:48:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D104682 Josh Paetzel changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Progress |Closed CC| |jpaetzel@FreeBSD.org Resolution|--- |Rejected --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-ipfw@freebsd.org Fri Jul 14 11:13:58 2017 Return-Path: Delivered-To: freebsd-ipfw@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 189A9D9E5DF; Fri, 14 Jul 2017 11:13:58 +0000 (UTC) (envelope-from kulamani.sethi@gmail.com) Received: from mail-ua0-x231.google.com (mail-ua0-x231.google.com [IPv6:2607:f8b0:400c:c08::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 C7BB124AB; Fri, 14 Jul 2017 11:13:57 +0000 (UTC) (envelope-from kulamani.sethi@gmail.com) Received: by mail-ua0-x231.google.com with SMTP id z22so49962592uah.1; Fri, 14 Jul 2017 04:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=eG+7ZRaXj2qfr9t095v1uOJhs0zV/RheYOI2I4cL7XI=; b=FLDtecl0gycJhvXGjxtCHox7p28pdSNbg6pw3Cv7kZKxvZp6KAw4GrDG3u33ZoDr3B SWUF2uDXw5O77dTgshUyEKbrPQUUN1D19um1OQNNDz/jmdt6hai7X1t0T5nZt6j14TXv mHyrK0u1XAgI//t3QLKcYcvgDOP4nwH/iIuloSkdbRqJqvwTl7NkQpRRcHk2ydCUqthW 2utkXO/Yi+0kUhXWMTkTuN3g/gDGWUFh0SiM82wUJrJ8H0FACNmiKwPxbGa26p65L/ir /2SFu64MIg0oZbBOlc/H8k2jhO4PqEiJeIas6Aan4SGidDMUgmlcdZKEl/Hf8bGQul0t 6z6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eG+7ZRaXj2qfr9t095v1uOJhs0zV/RheYOI2I4cL7XI=; b=ZlSib4zzTyd9gQ0F9Rwcff/233y8VMW+/Sji7tdRz3EI17PymkRIfyG13uEhQbSJXm 1mvkYtiu5Gmfh7JmZ+tCnWRY8HW2RONKFgkR9haVyVLLDndjncZB7/Ayk0Q2hKNcmK2n ZSvDonQZlxS37E+xOa/9+g/PK1SUkAOYiRjr2+WeaVNA5zzR3gukkrpqFWDvkr0m4zim r0aibJ5uqFxpXyrb3F+hBi5NoRvpUTZpxrCDc3hKgcPASFJ34PS8LgQ9QOkBUmgN2s1m +dCmwwTb+geRvcFN7Euf3P8G8FQIRs8mu32G1o7efsj40swVcy70ZbXVt4IudbWyDzvf gAjg== X-Gm-Message-State: AIVw112qP1PeCJlp6ZvBp///ltDsb6Mtj1+khei3Buy4hJ/IW82S8VZd yweGv+2i8EK6bo0L18OwMvw0UcuCPsFv X-Received: by 10.176.80.19 with SMTP id b19mr5265930uaa.139.1500030836562; Fri, 14 Jul 2017 04:13:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.81.231 with HTTP; Fri, 14 Jul 2017 04:13:56 -0700 (PDT) From: Kulamani Sethi Date: Fri, 14 Jul 2017 16:43:56 +0530 Message-ID: Subject: Unable to set rule using service name To: freebsd-questions@freebsd.org, freebsd-ipfw@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 11:13:58 -0000 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 to any". Got error "ipfw: missing "to'' ". *I want to set rule for test1 where I have no idea about port.* *Also please help me how to know port number if any way is there.* *With best Regards,* Kulamani Sethi, Bangalore, India Mob: 9686190111 From owner-freebsd-ipfw@freebsd.org Fri Jul 14 17:01:43 2017 Return-Path: Delivered-To: freebsd-ipfw@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 BA6BADA7CFE; Fri, 14 Jul 2017 17:01:43 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D9046E215; Fri, 14 Jul 2017 17:01:42 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id v6EH1VNF095674; Sat, 15 Jul 2017 03:01:31 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sat, 15 Jul 2017 03:01:31 +1000 (EST) From: Ian Smith To: Kulamani Sethi cc: freebsd-questions@freebsd.org, freebsd-ipfw@freebsd.org Subject: Re: Unable to set rule using service name In-Reply-To: Message-ID: <20170715024608.T92704@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 17:01:43 -0000 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 to any". Got > error "ipfw: missing "to'' ". > *I want to set rule for test1 where I have no idea about port.* > *Also please help me how to know port number if any way is there.* RW well described (in freebsd-questions@) the relationship between port numbers and service names in /etc/services; assuming you know the name, that gives you the number. Are 'test1' and 'test2' real examples, or placeholders for real service names? In any case, you cannot specify a port number in a rule with proto 'ip'; when specifying port/s you need to specify 'udp' or 'tcp' protocol. Can you give an example of the actual packets (protocol, port number/s) that you want to block? cheers, Ian