LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 01:05 AM   #16
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 350

Rep: Reputation: 38
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, 06:11 PM   #17
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 350

Rep: Reputation: 38
NiceShaper is very nice.
 
  


Reply

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:43 PM
Limiting bandwidth per user v8hadas Linux - Server 1 01-29-2008 07:07 AM
Bandwidth limiting using iptables kripz Linux - Networking 3 12-04-2007 09:11 PM
Using iptables for something very specific - bandwidth based on user/day/time koobi Linux - Networking 3 10-05-2007 03:29 AM
Limiting bandwidth on a linux router <Ol>Origy Linux - Networking 6 01-26-2005 05:06 PM

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

All times are GMT -5. The time now is 11:09 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration