All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
65 views

How to handle QoS(traffic control) based on physical interface of virtual bridge?

I have a requirement to limit the traffic rate based on different interfaces of the router, such as controlling the upload speed of ssid1 to 10mbps, download speed to 20mbps, lan1 upload speed to ...
Ryan.Ran's user avatar
0 votes
0 answers
54 views

How to set speed limit per IP in IP range in Ubuntu

What I want: I've setup a openvpn-server and want the clients in range of 10.8.0.0/21 limit their speed to 10mbit for each IP as a total limit of 100mbit. wan interface : eth0 openvpn interface : ...
Root's user avatar
  • 101
1 vote
1 answer
6k views

WireGuard: Limiting download & upload bandwidth

I'm trying to limit download and upload speed of each wireguard peer to 512kbit. The problem is that my following commands, only limits download bandwidth of peer and doesn't limit upload bandwidth. ...
user3411911's user avatar
1 vote
0 answers
211 views

Why the CLASSIFY action isn't applied by the iptables?

Why might the following simple iptables rule not work: iptables -t mangle -A POSTROUTING -p tcp --dport 1194 -j CLASSIFY --set-class 1:10 ? I'm trying to prioritize outgoing traffic to VPN. I am ...
Serge Roussak's user avatar
2 votes
1 answer
3k views

traffic control (tc) filter not working

i am using Debian and am trying to limit the upload-bandwidth on an ip basis. The configuration is the following: #!/bin/bash tc=/sbin/tc $tc qdisc del dev eth0 root 2> /dev/null > /dev/null $...
Christian's user avatar
  • 141
0 votes
0 answers
279 views

how to apply TC htb class to each of IPs in an IP range separately?

I use HTB for TC and mark packets with iptables. First I mark a range of IPs (like 192.168.1.0/24). Now I want to apply a htb class to each of these IPs separately. If I add a class and a filter for ...
amirhossein nasseri's user avatar
2 votes
0 answers
1k views

Using tc qdisc, class, and filter to limit bandwidth (both ingress and egress) based on DSCP marks

I'm looking to set-up traffic shaping program that limits both incoming and outgoing traffic based on 6-bit DSCP field in IPv4 packet header. The user should be able to specify different rates for ...
dooble's user avatar
  • 21
3 votes
0 answers
2k views

Adding some delay to a specific port on localhost using tc and netem

I'm going to simulate a network latency on three different ports of local host by using tc (traffic control for Linux) commands. I run the following code: !/bin/bash tc qdisc add dev lo root handle 1:...
Folani's user avatar
  • 31
1 vote
1 answer
366 views

Delaying Server response for specific IPv6 address

I have 3 servers configured with IPv6 address and I want to add some delay to a couple of servers say S1 and S3. For IPv4, I'm using 'tc' command and it's working fine. Commands using for IPv4 ...
metadata's user avatar
  • 121
2 votes
1 answer
6k views

Limit packet rate, open connections, and IP addresses

On Linux, can I use tools like tc, iptables or others to control/shape network traffic on a network interface, for the following purposes: Control the network packet number rate (or the total number)....
WindChaser's user avatar
-2 votes
1 answer
635 views

Linux control packet size for specific IP address

I would like to get Linux tool/script to control packet size of specific IP or MAC. For example if IP reach 10 MB then DROP packages with IP tables. I have idea how to DROP, but I don't have idea how ...
aze2201's user avatar
  • 101
1 vote
1 answer
6k views

I need it simulate a delay to a certain IP over as certain port

I need to simulate a traffic slow down to a certain service. That means I need to slow connection on a certain port. I have this script that introduces a delay to a certain IP on all ports, but other ...
GreenFox's user avatar
  • 111
1 vote
2 answers
6k views

Traffic shaping with iptables, ipset and tc (--match-set and --set-mark)

I am having some trouble with what I believe should be a fairly straightforward traffic shaping problem. I have an Ubuntu (16.04) server that is acting as a router/nat. I want to allow most users to ...
Gav's user avatar
  • 113
2 votes
1 answer
903 views

Minimum bandwidth limit on Linux systems

I need to limit the minimum bandwith from an IP to specific services/ports, by dropping all the packets that will not satisfy that minimum rate. I saw the attribute rate in the HTB class of the Linux ...
Lucap's user avatar
  • 21
0 votes
0 answers
204 views

How to slow traffic on a proxy?

I'm trying to slow down the traffic on my TCP forking proxy. The code is no longer located on the proxy, I'm still testing on my laptop; all HTTP(S) requests on Chrome are redirected with ...
elmazzun's user avatar
  • 153
1 vote
1 answer
3k views

Limit bandwidth per connection in Linux

I wasn't really able to google this which surprises me but maybe I was just looking the wrong way... I would like to limit bandwidth per one TCP connection ie. all the connections are coming to a ...
NZT's user avatar
  • 11
1 vote
0 answers
938 views

TC not classifying packets correctly based on iptables MARK

I have machineA that is connected to the internet via eth0. MachineB on the other hand is connected to machineA through a mesh and is connected to the internet via machineA. I am trying to give lower ...
Ogoose's user avatar
  • 11
0 votes
2 answers
7k views

OpenVPN Variables Passed via Script

Can someone explain and/or direct me to a summary of the variables that are available to be passed to OpenVPN upon a client connection? For example, what do the following $1, $2, $3, $4 values ...
Server Programmer's user avatar
1 vote
2 answers
1k views

cannot identify YouTube traffic with ndpi-netfilter, when using Google Chrome

I have ndpi-netfilter installed on Ubuntu and I need to shape the youtube traffic to 100kbps using tc module. I classify all youtube traffic to a one class through the iptables and apply tc class to ...
Shamin Weerarathne's user avatar
0 votes
1 answer
1k views

Add latency and random packet drops excluding SSH packets

I want to add some random delay/drop to all packets excluding SSH packets. I can do that to all packets this way: tc qdisc change dev $NIC root netem delay 100ms 10ms 25% tc qdisc change dev $NIC ...
ehsun7b's user avatar
  • 131
6 votes
3 answers
1k views

Advanced dynamic routing with external program

I need to build a system in which i am able to route packets based on a number of parameters, such as port/protocol etc, which are somehow "normal", but also on other aspects, such as queue length, ...
lbedogni's user avatar
  • 111
0 votes
1 answer
231 views

Linux Traffic Shaping: ceil rate never reached

My application run on port 8080. I have this iptables command: iptables -A OUTPUT -t mangle -p tcp --sport 8080 -j MARK --set-mark 10 I have also theses TC rules: tc qdisc add dev eth0 root handle ...
GPointer's user avatar
1 vote
3 answers
2k views

Linux: limit specific port rate by combining tc with iptables does not work as expected

The script blow tries to limit the incoming rate of the port 2000, when using iptables to mark the INPUT packets does not work, but OUTPUT works fine. I use nc -kl 2000 on machine 10.0.1.54 and iperf ...
tianchaijz's user avatar
2 votes
1 answer
2k views

Traffic shaping outbound clients source ip with tc / iptables

My question is I am trying to limit a users bandwidth on a server and wondering the best way to do this. Before I dive to far into the tc/iptables I was wondering if I could get any advice on this ...
dryve's user avatar
  • 23
5 votes
1 answer
18k views

Debian7 and tc qdisc issue : RTNETLINK answers: No such file or directory

I've been searching for few days now but couldn't find the solution to my problem. I have a VPS running Debian 7, and I have root access. I am trying to add some traffic shaping (using HTB), so the ...
Raphael Laurent's user avatar
-1 votes
4 answers
266 views

Is there anyway to tell what user will receive data from inbound packet?

In linux, considering this use case: 1. User initiates http request for webpage to remote server 2. Remote server answers request and sends packets Is there any reference to the user who started ...
Rooster's user avatar
  • 495
1 vote
0 answers
234 views

How to test if packet has been tagged with classid

I'm trying to troubleshoot an issue I'm having related to IFB Mirroring which I'm attempting to deploy based on this question: Tc: ingress policing and ifb mirroring My theory is that since the ...
Rooster's user avatar
  • 495
1 vote
1 answer
2k views

Can TC limit bandwidth by the Qos field of IP header

We are developing a client/server applications. There are three types of network data in our server app: Realtime data such as those of Video/audio, Critical Data such as those of Database data and ...
Steve Peng's user avatar
1 vote
1 answer
2k views

TCP packet filter based on TCP sequence

I need to build a test environment with a very precise packet loss based on specific TCP sequence or, optionally, on payload content. I couldn't figure out how to do it with tc or iptables. What tool ...
jackhab's user avatar
  • 781
0 votes
1 answer
10k views

How to add delay to incoming traffic?

For purpose of continuous testing, I would like have apache server to serve static files with at least 20ms delay. I tried to find a apache configuration setting or a plugin with similar ability, but ...
bbaja42's user avatar
  • 161
3 votes
2 answers
4k views

how to limit upload bandwidth per user in linux?

Can anyone provide the tc command to limit upload bandwidth per user in Debian Lenny? I found that to mark packets per user with iptables I can use the following command iptables -t mangle -A OUTPUT ...
Gihan Lasita's user avatar
4 votes
2 answers
762 views

Matching last fragment of IP packets using tc or ipfilter

I am transmitting UDP packets of say 2900 bytes. Due to fragmentation, packet is divided in 2 IP fragments. My tc u32 filter (more fragments bit and IP/PORT combination) matches only first fragment ...
Pritesh's user avatar
  • 41
1 vote
1 answer
3k views

Limit bandwidth using tc, iptables, and htb

I'm running a Debian server and was wondering if there are good resources out there, to which you can point me, where I can read about traffic limitations. I have a couple of users sharing one server....
Server_Noob's user avatar
1 vote
1 answer
877 views

how to tune tc rate parameter for optimal performance with htb/sfq?

I'm new to using tc/htb and I've just copy/pasted the script at ... http://lartc.org/howto/lartc.cookbook.ultimate-tc.html ... to run on the office gateway. The reason is to prevent large downloads, ...
SpliFF's user avatar
  • 404
4 votes
3 answers
5k views

Making iptables recognize youtube streams and large files

I use Ubuntu server 10.04 with the stock kernel as a NAT router. I use iptables and tc to do port based traffic prioritization. It is working fine. I have given http higher priority. So my network ...
nixnotwin's user avatar
  • 1,543
1 vote
2 answers
3k views

controlling the bandwidth using tc

I have two NICs. eth0 is connected to the internet and eth1 is connected to the LAN. I want to restrict the download limit using iptables and linux tc. So I wrote a test script to verify if it is ...
Supratik's user avatar
  • 2,164
2 votes
1 answer
887 views

traffic shaping for certain (local) users

i'm using ubuntu 10.10 i've a local backup user called "backup". :) i would like to give this user just a bandwidth of 1Mbit. No matter which software wants to connect to the network. this solution ...
JMW's user avatar
  • 1,463
1 vote
2 answers
2k views

tc simple rate limiting

I would like to do a simple rate limiting so all the http traffic (in & out) going to or from my http server is shaped. I have a GigE connexion on the server and I want to rate limit all HTTP ...
user avatar
1 vote
1 answer
718 views

Traffic control: marking packets for shaping

I'm seeking advice about which technology to use to classify packets for shaping in traffic control (tc). I've found at least 3 that could be used: iptables MARK iptables CLASSIFY tc filter Which ...
facha's user avatar
  • 1,368
1 vote
2 answers
4k views

higher traffic priority for FPS game in Linux

Goal: when running a FPS game in Linux, automate the setup of higher priority for its network traffic I know such tasks are usually accomplished with a combination of iptables (to mark IP packets ...
halp's user avatar
  • 2,228
1 vote
2 answers
840 views

How much traffic a linux-based shaper would be able to chew

I have a linux based traffic shaper (iptables + tc htb policy). It works in bridge mode. Shapes traffic based on IPs and ports (there are about 100 rules in the "mangle" chain of iptables). Right now ...
facha's user avatar
  • 1,368