LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-29-2015, 12:05 AM   #16
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 501

Rep: Reputation: 45
Question --uid-owner and upload/download throttling @ different rates


Quote:
Originally Posted by alexxxutz View Post
I discovered that i can use TC and IPTABLES for limiting bandwidth on SSH per linux user.
First i added the command:
Code:
iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner test -j MARK --set-mark 1
to mark packet.
Then i used this script to limit bandwidth:
--uid-owner only works with OUTPUT or PREROUTING, yet the bash script sets up two tc flows for upload/download. The iptables command above only works for packets originating from the owner ("test" in that case), correct? Thus it only applies to upstream packets. How would I throttle download speed, too?
 
Old 12-16-2015, 05:11 PM   #17
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 501

Rep: Reputation: 45
NiceShaper is very nice.
 
  


Reply

Tags
bandwidth, iptables, limiting, linux, tc, user



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"iptables tc" limiting bandwidth for specific port maxut Linux - Enterprise 1 12-16-2015 09:43 PM
Limiting bandwidth per user v8hadas Linux - Server 1 01-29-2008 06:07 AM
Bandwidth limiting using iptables kripz Linux - Networking 3 12-04-2007 08:11 PM
Using iptables for something very specific - bandwidth based on user/day/time koobi Linux - Networking 3 10-05-2007 02:29 AM
Limiting bandwidth on a linux router <Ol>Origy Linux - Networking 6 01-26-2005 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration