aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Packetshaping the mule  (Read 1733 times)

aris

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Packetshaping the mule
« on: November 03, 2004, 03:26:24 AM »

Hey kids!

I'm using FreeBSD-5.2.1 with pf firewall (the new OpenBSD one, as opposed to the other two firewalls the FreeBSD kernel happens to carry around), and, on top of that, the ALTQ packetshaping framework.

To make a long story short, this enables me to prioritize (or shape) packets on the firewall rules themselves.
That means, if I can identify the packets as mule-related, I can also deprioritize them enough so they don't bother my regular home network operation.

That said, I'm in a fix.
I can identify the incoming sessions just fine - TCP port X, UDP port X+3 and UDP port Y. I can build rules to catch them and prioritize them easily.

BUT

the outgoing sessions pose a problem - I have no definitive way to identify them. 80% of them or so connect to a client that uses default ports, and can be caught easily enough by catching tcp 4662 and udp 4672/4665. My problem is that the remaining 20% hog the traffic up.

Is there any TCP, IP or other attribute a firewall might recognize to set these packets aside from the rest of the traffic? (I have quite a bit of other traffic, of all sorts and flavours, so catching mule traffic using a default rule is a severe annoyance..)

Furtheremore, is there anyone here which tried this combination? (mule+pf+altq?)

Thanks!
Logged

lfroen

  • Guest
Re: Packetshaping the mule
« Reply #1 on: November 03, 2004, 05:03:48 AM »

Quote
the outgoing sessions pose a problem - I have no definitive way to identify them

There's very definitive way - by processs id of amule. iptables can mark packets on pid bases. After that, you can set up shaping based on iptables mark.
I used linux TC for that.
Logged

aris

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Interesting
« Reply #2 on: November 04, 2004, 01:26:32 AM »

This is an interesting approach, definitely worth looking at.

Only problem is that iptables is the frontend to netfilter, the native linux-kernel firewall, whereas I use pfctl, which is a frontend for pf (The native OpenBSD firewall), which is, well,  a completely different firewall altogether.
 
I'll read up on whether pf has a similar capability. Thanks for the idea.
Logged