From owner-freebsd-questions@freebsd.org Tue Jun 23 07:54:30 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85BDD34CF3E for ; Tue, 23 Jun 2020 07:54:30 +0000 (UTC) (envelope-from xpetrl@beepc.ch) Received: from srv.fastssdserver.com (srv.fastssdserver.com [162.223.31.2]) (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 49rdpY1W12z49dh for ; Tue, 23 Jun 2020 07:54:29 +0000 (UTC) (envelope-from xpetrl@beepc.ch) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=beepc.ch; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=UICQwyZqTwCeofILv9+BeUmpMeBQaDdqcYgJZvZ+bjk=; b=Agu4itDIFReOWlRo86zw9shO9F KZmqBSaLib2T/8gSrElXYtJKOPZiTQ0A7/9jg3LgrrPCGvVkXSop6LJRd1SHj762tQYBWOxpklkSC vRQCzQ8rw4ZLX7nECfV2/YvgXhxb2FcOmzL5zn0Oj2j17+ZxKksXTuamt9d/cxuSTYaYiBc+e2vL7 Rtu2oMwhLa/i4bG1qAL/Phyrd4VDpDQEDccHqkYRevzZydwUVO7KE6y/FdGnEApRjbPDWwrx13bL3 9zDMBKjqQq3joDLx6Cm4f0/o+qx9jucuwRQjtRbk92urwxShGmfUhmxMIpGk1C3GSq8IRklFmh2fN DkOIfY1A==; Received: from [185.43.245.85] (port=53648 helo=[10.5.50.185]) by srv.fastssdserver.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jndl8-009kgf-1t for freebsd-questions@freebsd.org; Tue, 23 Jun 2020 12:54:22 +0500 Subject: Re: limit bandwidth for a process To: freebsd-questions@freebsd.org References: <8cb1b4a8-b839-e495-272e-1b12f0f2aa6b@freenetMail.de> From: xpetrl Message-ID: Date: Tue, 23 Jun 2020 09:54:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - srv.fastssdserver.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - beepc.ch X-Get-Message-Sender-Via: srv.fastssdserver.com: authenticated_id: xpetrl@beepc.ch X-Authenticated-Sender: srv.fastssdserver.com: xpetrl@beepc.ch X-Source: X-Source-Args: X-Source-Dir: X-Rspamd-Queue-Id: 49rdpY1W12z49dh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=beepc.ch header.s=default header.b=Agu4itDI; dmarc=none; spf=pass (mx1.freebsd.org: domain of xpetrl@beepc.ch designates 162.223.31.2 as permitted sender) smtp.mailfrom=xpetrl@beepc.ch X-Spamd-Result: default: False [-2.11 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[beepc.ch:s=default]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_X_SOURCE(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.98)[-0.978]; DMARC_NA(0.00)[beepc.ch]; R_SPF_ALLOW(-0.20)[+a]; DKIM_TRACE(0.00)[beepc.ch:+]; HAS_X_GMSV(0.00)[xpetrl@beepc.ch]; NEURAL_HAM_MEDIUM(-0.94)[-0.938]; HAS_X_ANTIABUSE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; NEURAL_SPAM_SHORT(0.30)[0.302]; ASN(0.00)[asn:46261, ipnet:162.223.31.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2]; HAS_X_AS(0.00)[xpetrl@beepc.ch] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 07:54:30 -0000 On 6/23/20 6:32 AM, Bruce Ferrell wrote: > On 6/22/20 6:28 PM, Wesley wrote: >> Hi >> >> How can I limit a process's bandwidth usage in freebsd? >> For example, I want proftpd can consume max bandwidth 50mb. >> >> Thanks. >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" >> > At the OS level, there is little you can do.  At the the firewall, you > can limit the bandwidth the ports used by FTP uses. > Yes, at firewall level, i.e. PF (Packet filtering) can do that. FTP is using per default port 21 for command and random port for transfer with clients. For this reason, isn't trivial to firewall an FTP server and you have to use an FTP-Proxy, which makes the program useful on firewall. _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"