Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto limit / block upload traffic of an application
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2686
Location: de

PostPosted: Sat Dec 22, 2007 11:50 am    Post subject: howto limit / block upload traffic of an application Reply with quote

Hi,

I'm using Qsopcast for my wife to watch Brazilian TV. It's the only possibility for her to get something of GloboTV.

Now my special problem:

Sopcast works as a p2p-app. It means, I can download the TV in the same way I have to upload the streams. My internet connection is provided by the university where I live in a dormitory. I have a 100 MBit flat here but with a limit of 10 GB each day. If I use more then they will cut my connection for some weeks. The day before yesterday my wife watched Sopcast for several hours and forgot to shutdown it afterwards. In result: I had 2 GB download and 20 GB upload that day.

Most of the p2p-apps I know have an option to limit the download and upload rate (Azureus, aMule). Sopcast doesn't have.

1. How can I identify the upload port of Sopcast?
2. How can I limit or block the upload stream of Sopcast in a simple way?
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2463
Location: Germany

PostPosted: Sat Dec 22, 2007 3:13 pm    Post subject: Reply with quote

In general there is l7-filter for identifying protocols, but sopcast doesn't seem to be listed there. Maybe it is using another, better known protocol that is supported? Otherwise you'd have to add an iptables logging facility to find out what kind of traffic this software generates, and devise some means to filter it based on that. Then you could create some QoS shaping rules that will limit your applications upstream.

If sopcast is running on your own local machine, and not on a machine in the network, an easier method may be available, it may be possible to assign traffic based to local running processes, and thus limit the process itself no matter which kind of traffic it generates. I think this was possible using some iptables extension, but I forget the exact name...

EDIT:
Ah, iptables owner match support may be it. Mark all packets that are owned by the process you want to limit, and put those packets into a low bandwidth QoS class.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum