Application Layer Packet Shaping on Linux
sommere writes "We have added application layer (layer-7) filtering to Linux. That means that you can set up your linux-router/linux-switch to prioritize mail over the web over kazaa or gnutella regardless of what port each program is using. Colleges have been paying thousands of dollars for packet shapers to prioritize their networks, now you can do it for free. Get your kernel patch at l7-filter.sourceforge.net."
PS: fist post fools
Can I get a circle-shaped packet for the layers I have in Gimp?
i fuckin rule - furzp0zt
get lost stupid suckers
Slashdot has an interview [slashdot.org] with security legend Fyodor [kitetoa.com], admin of the famed insecure.org [insecure.org] and author of the world's most affordable port scanner, nmap [insecure.org].
The best part of this interview is that Slashdot does not often interview criminals. Many Slashdot readers know that Fyodor used his tool to illegally attack a college student in 2002, for his personal amusement but also to the benefit of Slashdot's admins. For those that don't know the story, I will present a brief summary.
*Those individuals interested in independently verifying the facts presented in this article should skip to the "Verification" section near the end.
Sdem [slashdot.org] had created a hoax account entitled electricmonk [slashdot.org], and used it to post this comment [slashdot.org] pronouncing that we was actually a cute Linux booth babe. "electricmonk" left an email at Yahoo and encouraged Slashdot readers to get in touch.
Fyodor proceeded to do so, boasting of his previous exploits with women he'd met online. He was even helpful enough to attach a picture.
This is where the story turns ugly. Sdem responded with a truthful email, in which he advised Fyodor that the whole thing was a hoax. After that, sdem posted a log of his exploits to sid=20721 (trolltalk), mentioning that he had tricked Fyodor and referring to many of the biters as "wankers". This apparently really set Fyodor off, and he began to plot criminal revenge.
First, Fyodor dug through insecure.org's referrer logs to find what IP address had requested the picture of Fyodor & his paramour. Using this information (and the logged User-Agent), Fyodor knew from the get-go Sdem's IP address and O/S. From this point, he launched nmap against Sdem's box and was greeted with the holy grail of sorts for BlackHats: an open X windows server on port 6000.
Sdem had been running an X-windows server for Windows on his Win2k box. Fyodor was able to bypass the authentication on the X-windows server and used the X-windows server to take complete screen captures of Sdem's machine whilst sniffing and recording keystrokes.
Fyodor proceeded to take hours worth of screen captures, including information on a "secret troll irc server" that sdem was using. Fyodor wrote a detailed writeup of what he observed, including an irc robot used on the server to detect new Slashdot stories for the purpose of early posting. Fyodor also mined and posted as much information about Sdem as he could find, including his real name and contact information. Jamie McCarthy used this illegally obtained information shortly after it was posted to log on to the irc server, monitor the bot, and modify Slashdot in order to break the story monitor.
Fyodor even submitted his "troll hunting" story to Slashdot, though it was rejected.
After he was done hacking Sdem's computer, Fyodor posted his screen captures and a log of his breakin to www.insecure.org/tmp/trolls [insecure.org]. The content was removed 24 hours later. He went on to boast in sid=20721 about his "troll hunting finale". While sid 20721 is regularly cleaned, a cache of Fyodor's boasting about his illegal break-in is available here [trollaxor.com]. Very interesting reading.
So, while Fyodor's interview is no doubt very interesting, I think that, as an accomplished (and due to the lack of prosecution very successful) criminal, the nature of questions given to Fyodor in the interview don't do justice to the type of expertise thi
Update: "Fist Sport" explained. (05/17/01)
---
---
It has come to my attention that the entire Linux community is a hotbed of so called 'alternative sexuality,' which includes anything from hedonistic orgies to homosexuality to pedophilia.
What better way of demonstrating this than by looking at the hidden messages contained within the names of some of Linux's most outspoken advocates:
Linus Torvalds is an anagram of SLIT ANUS OR VD 'L,' clearly referring to himself by the first initial.
Richard M. Stallman , spokespervert for the Gaysex is Not Unusual 'movement' is an anagram of MANS CRAM THRILL AD.
Alan Cox is barely an anagram of ANAL COX which is just so filthy and unchristian it unnerves me.
I'm sure that Eric S. Raymond, composer of the satanic homosexual propaganda diatribe The Cathedral and the Bizarre, [Buy At Amazon] is probably an anagram of something queer, but we don't need to look that far as we know he's always shoving a gun up some poor little boy's rectum. Update: Eric S. Raymond is actually an anagram for SECONDARY RIM and CORD IN MY ARSE. It just goes to show you that he is indeed queer.
Update the Second: It is also documented that Evil Sicko Gaymond is responsible for a nauseating piece of code called Fetchmail, which is obviously sinister sodomite slang for "Felch Male" - a disgusting practise. For those not in the know, "felching" is the act performed by two perverts wherein one sucks their own post-coital ejaculate out of the other's rectum. In fact, it appears that the dirty Linux faggots set out to undermine the good Republican institution of e-mail, turning it into "e-male."
As far as Richard "(cock)Master" Stallman goes, that filthy fudge-packer was actually quoted on leftist commie propaganda site Salon.com as saying the following:
And this isn't a made up troll bullshit either! He actually stated this tripe, which makes it obvious that he is trying to politely say that he's a flaming homo slut!
Speaking about "flaming," who better to point out as a filthy chutney ferret than Slashdot's very own self-confessed pederast Jon Katz. Although an obvious deviant anagram cannot be found from his name, he has already confessed, nay boasted of the homosexual perversion of corrupting the innocence of young children. To quote from the article linked:
Is this why you were touching your penis in
subscribing to get fp.
This really helps networks that have smaller circuits and lots of clients doing various tasks on them. Not such a big help for a home user but great for corporations.
It's looking more and more like commodity linux boxen, with the right software, can do what your average pricey cisco box is renowned for.
If you can't beat them, arrange to have them beaten. -George Carlin
Hmm.. packet shaping.. can't wait to merge this in with the rest of my kernel and give it a whirl.. although, I do have to admit that some of the packets I've been getting are pretty nicely shaped.. there's the Ana packets, and the Kim packets.. but if this patch can help shape some of those no-so-well-shaped ones, I'm all for it!
---
Refusing to be a karma hore! Score: +5 Funny, -1 Karma Hore
I just downloaded mozilla 1.4. AND it's worser than cowboyneal sause! Stick with Opera if youre on win32, and konqueror for lin32.
In one hand, >I can prioritize what I want how I want. And it was good.
In the other hand, my ISP may downgrade my Quake performance or my school may block telnetting to my home box completely (no matter which port I put the demon on). And this was bad.
The idea is good but I'm worried it will be heavily abused and that worries me. In the other hand, it may mean a neat security tool...
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
THIS is the missing SCO code!!!
:)
hahah, just kidding. Laugh, it's funny.
It cost my school 15 grand for 100mbit of shaping to be exact. Try using Kazaa when there are 4 huge dorms full of students trying to access kazaa, irc, ftp, hotline and some other protcols on 150k. Not fun
Tim Smith - Ramblings from Nerd Land
This type of thing has been in OpenBSD long time now (altq) but it nice to see that this type of thing is done in linux.
The problem in the world today is communication. Too much communication - Homer Simpson
Wow, my kids/I can't take no more of that spam/fuckedupfuckingshit. Please, someone in the Italian mob, please, chop off the head, testicles and legs of the perpetrators.
And oh, what's this, another fist post by your's truly that was actually modded up?
Mad fist post fools. =)
you can set up your linux-router/linux-switch to prioritize mail over the web over kazaa or gnutella
I vote for more kazaa than mail. Unless someone sends me movies by mail.
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
Title says it all really. This will be of great help to those who implement/support Linux on a commercial level.
An infinite number of monkeys will eventually come up with the complete works of
I'm sure the guys who are employed to code packet shapers are real thrilled that you just destroyed their job, Linus. Is this what Linux is doing now, destroying the income of even those who write for Linux? What are these guys supposed to do now, work at McDonalds? They can't be moved over because someone else already has that job. They will have to be fired.
Amazing, Bill gets bashed because he bundles IE with Windows. But if Linus does a similar thing, oh that's just peachy.
STOP BUNDLING IN LINUX!
If an attacker knows that you prioritize a certain service, wouldn't he cause a greater disruption with his DOS with this?
Another thing: couldn't the ??AA get ISPs to use this feature, not to kill P2P sharing, but to reduce its priority (perhaps as a compromise from not being able to kill P2P outright)?
Of course, there are many benefits to this as well, I'm just pointing out possiblities.
It is obvious to anyone that you could not possibly have developed such an advanced feature for the Linux kernel on your own or with the help of the community. This feature has obviously been lifted verbatim form the proprietary Unix code owned by SCO. I expect you to pay our standard SCOSource licensing fee of $150US per processor running this code, IMMEDIATELY. Failure to pay for this license within the hour is a violation of SCO's Intellectual Property rights and WE WILL SUE YOUR ASS OFF!!!!!!!!!!!!!
Darl "Sue em" McBride
How can the FIST POST be redundant? HOW?!
How does a router know what the intended purpose/application a packet is destined for? Does not only the receiving computer actually know what applications have bound what ports?
Some drink at the fountain of knowledge. Others just gargle.
Yes! Hopefully my college's sysadmin will be nice enough to make Kazaa so slow that people will stop installing that spyware-infested, OS-breaking POS software, so that I (being a dorm's paid computer janitor) won't have to fix their computer later on :P
Now, if something could be done about stopping those fine young college girls inadvertantly running attacks on their campus's servers? :P
(Now that I think about it, I don't mind the girls needing help so much as the dumb college guys spilling beer on their laptop's keyboard...)
Is there any documentation on this feature or any other QoS/traffic shaping for linux?
I'm really interested in finding a way to limit bandwidth based on IP or MAC address or both. I understand dummynet for freebsd is great at this but I don't think it will work with my shuttle box due to the SiS 740/961 north/south bridge combo. I could barely get it working in linux.
Anybody have a good howto or something for linux traffic shaping?
-Robertasshat.
Why isn't anyone trying to make a home-server linux distro? "just put the cd in and wait, in half a hour you will have a printer-sharing, file-sharing server that will greatly enhance your internet experience! Now you and your family can download, surf and game without any problems in the bandwidth!" If Linux is going to break into home of joe average that might very well be the way. As a black box that does wonders for you. No learning, no configuring, just advantages.
For those of us practicing for our CCNA exams... packets are at layer 3, its known as data at layer 7.
FLR
If your ISP starts using stuff like this start using a encrypted protocal to transport and tunnel your normal software.
Your ISP can tell you have a SSL tunnel but it's really hard to check what the packets are for.
There are ways around it. Currently the problem is with large amounts of ignorant or clueless users just destroying networks with stupid Kazaa searches for porn. Now they'll have to upgrade or try harder.
Remember it's like attrition (like spam) each side just one upping the other side
This packet shaping software must be watching for embedded packet headers within the stream.
Suppose you have a Kazaa packet that is tunneling through HTTP. The shaper notes the HTTP header and passes the data according to HTTP rules until the embedded Kazaa packet is found. Now the shaper switches to Kazaa mode and shaping changes accordingly.
Now, if you want to defeat the shaper, tar and compress your kazaa files, then uuencode them and embed them inside html files. To the packet shaper, it looks like you are transfering some very large web pages. Alternately, drop your uuencoded text into mail messages, instant messages, etc.
Does anyone else use Wondershaper? It works very well for my cable modem and is extremely easy to set up and use. Any comments on how it compares to this one?
Good work.
I've been doing traffic shaping based on port policies for months using the CBQ.init Script.
What's the advantage of using Layer-7 shaping, when CBQ does it quite efficiently?
This only works until the protocols become smarter. An encrypted IPIP (or SSH, or IPSec, et. al) stream carrying kazaa traffice looks the same to a packet inspection system as an encrypted IPIP tunnel carrying data from your rotodynamics sensors. There will come a point when bandwidth usage will be dealt with at the social level because all technical solutions have been obsoleted by encryption and tunnelling.
Thankfully, once your packets get routed onto the backbone, you shouldn't have to worry about this. Why? Because your data is packetized, and the internet is best effort. That means that your packets may travel over several sources to get to the destination. Thus, it would be possible to fragment your packets locally to a very high degree so that a router in the backbone would never be able to tell what protocol is in use because the packets would be sent via various hosts. So, the MPAA can't go an install this in the backbone of the net to stop your l33t divx pirating.
On a local network, well that's another story. There will always be ways around stuff like this though. It wouldn't be hard to get another link (cellphone?) and send just enough packets over that to make stuff confusing.
My Slashdot account is old enough to drink...
There is no SCO code in that patch is there? :)
Sorry I had to do it for one of these posts.
Mike
I didn't use the preview button, so get over it!!!!
Mike
I love you moderators. You mod up an incorrect post because you too are clueless. Here's a tip; when you don't really know the subject, don't moderate the post.
This dweeb is el wrongo and has a LOT to learn before he gets his shiny CCNA. I'll offer him this tidbit; your post would get you kicked out of the CCIE exam.
TTFN
Now that would be useful to have in the kernel.
I know you can do a certain amount with Apache, but to be able to slot a nice little Linux box in where an Alteon would normally sit would be a)cool and b)cheap.
oh brave new world, that has such people in it!
I suspect there are uncountably many other p2p systems, but as you have already noted none of them have the adoption rate of Kazaa.
The problem of adding to Kazaa is that it is uncertain what you will get out of it. Not uncertain in the sense that I was uncertain that my MSFT options would ever have value (they didn't), but uncertain in that when you identify your effort you open yourself to legal sanction.
That coupled with the scarcity of programming work today may explain why we see innovative security tools and p2p software that is still focusing on 1998-99 technology.
Finally, I can make sure my pesky mail doesn't slow down my pop-up ads!
[ http://www.dvigroup.net/self ]
but if you were considering deploying this on any server of major importance, you may want to notice that they moved from 0.0.1 release to 1.0 release in 11 days. I for one, am now even more eager to fire up this patch and then break it. :)
"This is Zombo Com, and welcome to you who have come to Zombo Com" - www.zombo.com
My name and thier protocol, it's kinda like Phoenix browser and database!!
For those not ready to upgrade to Linux 2.5, and for those on other platforms, there is Trickle, a userland traffic shaper for Linux, *BSD and Solaris. It works on a per-process basis (or on groups of processes to limit aggregate traffic consumption), does not require root-level access nor kernel patches, and is, of course, open source.
This would be great if we were running ISO protocols(except that they never really actually worked), which had seven protocol layers. TCP/IP is generally described as having five layers. So how do you filter layer 7 when there are only five layers?
Information is not Knowledge
own the OSI model? =-).
My bro is an avid Kazaa/WinMX Pr0n colletor, and I'll come home and find 25 people downloading from him and his HUGE collection of trashy pr0n. :)
I'd like to be able to leave it running in a weighted environment without having to manually decide what share he should get or kill all the downloads
errr....umm...*whooosh* *whoosh* Is this thing on ?
Yep, if you have c:\... They disabled access to "program files" and "winnt" directories. (including temp directory, so if you get some files created there and they get your profile over the disk quotas, you can't even delete them, and since you're not allowed to save anything, the logout session can't be saved, the only logout method is the reset button.)
Posting anonymously to save my freshly earned karma modifier from harm if this gets modded down as offtopic (which it is). - SF.
FreeBSD has had this for years. Why keep on reinventing the wheel? Fight NIH!
Hmm ... ALPS for Linux ... sounds like it would go perfectly with my breast-shaped keyboard!
It was just a few months ago that i needed a solution like this but had to bite the bullet for one of those $15,000 packetShaper routers. This is great and it sucks at the same time ;(
More p0rn less SPAM :)
The computing service (who're responsible for the university and student networks) monitor general levels of traffic; if you've been using a lot of bandwidth for extended periods of time, they'll contact you, ask you what your excuse is, and tell you to slow down. The idea is that after a few warnings they'll disconnect your network socket, but most people take the hint.
Just looking at the stats rather than the protocol is also good for plausible deniability, since they don't particularly want to know the specifics of illegal file sharing and the like; they have been known to specifically stop a Direct Connect hub, but IIRC that was after another student had a private feud with the hub operator and decided to report them, after which the computing service had little choice.
They also occasionally scan random IPs for common server and trojan ports, then connect to some servers to see what banners etc. they produces, but this is more an anti-h4x0r thing than anything else; they don't even seem to mind students running low-traffic web servers on port 80, but they're likely to contact the student and verbally cluebat them if the server says it's IIS.
Depends on the size of your incoming pipe. With my ~1.5meg DSL connection I expect my current hardware could keep up with it quite nicely; the hardware ain't where the bottleneck is. If I had some gigabyte fiber coming into the home it might be different, but for now hardware performance will not be a problem. What I can do with the new technologu is a different matter. Would still like to see more ideas than how to share porn.
I'm an American. I love this country and the freedoms that we used to have.
+/* XXX Is it ok to do nothing here? This gets called each time a filter
+is added (not sure why). */
This ain't touching my kernel...
Damn Kazaa users, how dare they saturate the network and degrade your Kazaa experience.
"I assumed blithely that there were no elves out there in the darkness"
This 'Linus' Gnome' clearly violates the First Law of Thermodynaics.
"I assumed blithely that there were no elves out there in the darkness"
I'm curious about this... how much luck would the traffic shaper have telling apart, for example, an SSL-encrypted IMAP session, HTTP session, or Jabber session. If they were going to arbitrary ports how would it tell them apart?
Does it need to perform its own man-in-the-middle attack to get at the transmitted data?
Guys, the XMMS team has been busy with exactly what these L7 guys are trying. Check out http://www.packetlogic.com No wonder XMMS is stuck at 1.2.7 :)
It runs on Linux and blows the doors of anything Cisco, Allot, anybody else can do with Layer 7 protocol shaping/firewalling and better yet, you even get real-time surveillance.
Don't tell my boss; he might make me put this on the router so his EverQuest sessions don't start lagging when some secretary starts doing useful work online...
What I really want is to be able to redirect based on packet data, rather than port number.
If you can tell me how to do this on LVS, then I'd be much obliged - I can't see how to do it...
oh brave new world, that has such people in it!
It doesn't even see the code anymore, just - redhead - blonde...
Any technology distinguishable from magic, is insufficiently advanced.
oh brave new world, that has such people in it!
Vital services can still get in while your webserver remains overloaded.
Why are we advertising this? We're ruining the basis of our whole community!
Vehicle Stars used car search is my current project
Hi clitoris chopper, ISLAM supports clitoris carving. You are Islamic, and of course are a fucking animal. I hate you you pull-start camel jockey lover. Towelheads, Camel Jockies, Sand Niggers, Ackmids, Abeebs, Carpet Flyers, Dune Coons, Rag Heads, Sand Scratchers, Habeebs, Abba-Dabbas, Camel-Humpers, Demi-niggers, Fig-Gobblers, Hucka-luckas (hucka hlacka ghalcka ghugh), Lefties (If you steal, you lose the right hand so, since they are thieves...) Ocnods, Pull-Start-ables (imagine pull starting Ossama's dirty rag like a Briggs and Stratton), Roach-Ranchers (habibs cant kill roaches by a tenant of Is-slum), Sand Moolies.
Shut up all you dirty fucking Islamic pigfucking swinehundts and the pigs, the communist fuckin Islamic terrorist supporter.
Take your fucking Koran and cram it up your ass. The sooner the earth sees Islam leave it, the better off it will be. Your Koran is Goat Piss.
I hope if there is a God and a Hell, you have to drink the liquidy shit from a Pig's ass, and Jewish Rabbis defecate on you.
I hate the stupid ISLAM fucks who read into the trash they come up with. Saddam Hussein [who needs to take a dirt nap] is higher on my sanity list than fucking Muslim "clerics." In fact, I like Saddam more than most of the other Arab leaders because he is secular. We should fucking nuke the Saudis and Mecca and Medina and turn it into rubble, then tell Saddam to remove the heads of all the buttfucking "royalty" in the area.
I want to wipe my ass with Mohammad's shroud. I want to grind his body up into bone meal and fertilize my garden with it.
Our tortured dead scream out in HORROR, asking for vengeance:
Nuke their countries to hell.
Nuke them again.
Death to Islam.
I piss on Mecca. I wipe my ass with the Koran. I shit upon Mohammed. I wipe the cum for a freshly fucked pussy with Mohammed's shroud then throw it in the pig sty so it can mire in pig shit as it decomposes.
got a full t-1 going through a linux router box with QoS, I started out just scheduling based on port, but now packet size is the best way. The pipe could have very heavy traffic, but yet my shell is a smooth as silk, DNS querys are quick. I recommend it highly
The American government is officially totalitarian
This is not a nightmare
It really is this bad
Please don't insult the suffering of all those who have actually lived under totalitarian rule.
So, if you happen to act like a terrorist the government will treat you one. They might even be blatantly racist and overzealous. But they're not totalitarian.
Dissent is still very much a part of America--and no one, yet, has been punished just for speaking out against the government. (Well, not citizens by the government. A few university professors and private citizens have lost their jobs, and a few immigrants have been forcefully emmigrated, but you get the point.)
(Not that Republican domination isn't that scary--[just what we need, tax cuts in wartime]--but it's not quite totalitarian. Might as well call Canada Communist.)
IMNVHO this would be better done in the netfilter (aka iptables) kernel subsystem than in the qdisc system. Not only can it then be used for more than just rate limiting (but also for firewalling, transparent proxying etc), but there is limited similar functionality already available in the patch tree (the STRING match) that could be extended to run regular expressions. Importantly, netfilter can communicate with the qdisc subsystem by tagging packates appropriately, enabling the rate-limiting and advanced queueing already discussed. I'm sure that the core work already done could be ported from one subsystem to to the other, although perhaps not overnight.
The fwsnort tool has proved the concept, I think, by translating rules from the Snort intrusion detection system into iptables rulesets.
For more complex protocols, such as FTP or IRC DCC, you'd also get Netfilter's connection-tracking support code for free.
I also think beginners will find the iptables tool easier to deal with that the tc tool, which has a steeper learning curve.
The Cisco equivalent of this is called Network-Based Application Recognition (NBAR). Rather than use regular expressions, Cisco ship PDLMs (Packet Description Language Modules) that can loaded and unloaded whilst IOS is running, much like you'd get by combining Netfilter's ip_conntrack_helper modules with the ideas these guys have.
(I still think they should be doing this inside Netfilter rather than qdisc)
NBAR can also be - and is - used to filter network worms at ISP borders, by matching the specially-crafted URLs used to compromise vulnerable systems. For example, here's the Cisco config to catch the Nimda worm.
If you were going to design a new network application, you could add a wrapper around your packet to make it look like an http packet or some higher priority packet.
http://yetanotherpoliticalrant.blogspot.com
You complain about the current bandwidth usage of your brothers pr0n collection, but when asked, you provide his KaZaA username on slashdot. That's like putting a gun to your head, pull the trigger and blame the bullet for harming you.
Kjella
Live today, because you never know what tomorrow brings
This one is not an insurmountable problem, I AM the network admin, and the router is like 3ft from me, I was just thinking a dynamic weighting system, ala mainframe would be the IDEAL solution to the problem.
errr....umm...*whooosh* *whoosh* Is this thing on ?
This is utterly redundant, but I can't help but pat the team responsible for this on the back anyway: this is a fantastic addition to the capabilities of the Linux kernel. Well done guys!
You win again, gravity!
Dearest crackhead moderators,
Why has this blatant, non-paid marketing drivel been modded as being "Informative"?
Please fix it.
Thanks.
[Next week: "Informative" magazine subscription offers, "Interesting" cheap long distance, and "Insightful" YOU'VE ALREADY WON proclaimations.]
After seeing all the enthousiasm I read the referring page and their FAQ. It seems to be yet another 0.1 release of something that could be done. This is not something you could actually use and the n maybe refine a bit...
Also, from the FAQ it seems they are on a fundamentally wrong track:
A: Linux Quality of Service only looks at outgoing packets (once a
packet is in your computer why would you want to slow it down?)
First, there really is a point in slowing down incoming traffic, namely to throttle down the other side and avoid excessive queues to build up on a slow connection. It seems they did not get that.
But worse, it is a fundamental flaw to only look at outgoing traffic, and it also seems to be inferred that there is no state kept for a connection (they say it "classifies packets", not that it "classiefies connections"). This makes it useless.
E.g. when the incoming packet says "HELO domain" you may not want to slow that down but you may want to put that CONNECTION in the SMTP category. What can you do once the connection is transferring the SMTP data?
What you need for any packetshaping to be successfull is a state kept per connection that allows further shaping based on earlier matches.
I agree,
By putting this capability into netfilter you could also vastly improve on IP Accounting. Now not just accounting by service port but also by Application!
Try this: Luinux.
Still has some shotcomings but i'm working on them.
of course I presume if I access something via an ssh tunnel or vpn (providing they have priority) this can't have any effect.
To place the packets in the classes, you need some filters. The 2 most used filters are fw (it can use iptables marks) and u32 (it can use any bit in a packet). So basically, you are limited to ip-addresses and ports.
But with l7 filtering, you can look in the packets and use the contents of the packet to filter the packets and place them in the class you want. To do so, you have to be able the recognise the traffic. And that's what the extra kernel patch will do.
The more people are looking for ways to recognise patterns, the better. So if you find a new way to recoginise kazaa traffic (use tcpdump or so to examine the packets), send it to the l7 patch author so he can update the protocol definition file.
Some handy URL's : :) with more info about traffic shaping with cbq/htb.
lartc.org : information about "linux advanced routing and traffic control"
docum.org : my site
> It's not impossible to do throttling on inbound packets,
/. less and less useful.
Why in the hell are comments like that given moderator points? It's yet another example of the garbage that makes
You can not directly control inbound traffic. Think about it. It can't be done. You can't control the other end of the connection. The other end should slow down if it doesn't receive ACK's, but again, it is impossible to throttle inbound packets. If you could, then most DOS attacks would not work.
Judging by the patterns that comes along with the l7-filtering package, I'd say this is actually a layer-5 filtering process. All the patterns check only for the strings that are specific for establishing and maintaining the sessions, such as the POP3-server acknowledging that it is ready to recieve data, like the HTTP part where it looks for the request of a file.
Z \%]*
.pat file.
What the patterns don't look at is the presentation layer, such as what kind of file it's trying to get, or in what encoding format it is transfered. It also doesn't care of the contents of the file requested, hence it is neither level 6 (presentation) nor level 7 (application), but simply layer 5 (session).
So, the patterns that come along with this are only layer 5. This however, doesn't mean you can't do layer-7 filtering. It seems easy to me to add words that just can't be searched for with google. just add something like:
sexgoogling
GET \/search\?q\=[a-zA-Z\%]*(sex|xxx|porn|pr0n)[a-zA-
to a
--
Niklas
Quidquid latine dictum sit, altum sonatur.
I think everyone is missing something more important than blocking P2P networks. How about blocking SPYWARE clients (gator, cydoor, et. al.). I've blocked their ip address, but they simply use a different one. What about blocking THOSE packets because of their contents, because of their security risk. That seems like a much more worthwhile goal to me.
Your astute observation that "...but it isn't going to beat custom hardware of the same generation..." (my italics) refutes your argument if you know what the state of dedicated HW vs off-the-shelf is right now.
In order to keep their BOM (bill of materials) parts cost down, vendors like Cisco put JUST ENOUGH processor, ram etc into those dedicated appliances to run highly optimized stacks like IOS effectively within the Quality of Service guaranteed by the specs.. Which often results in CPU/RAM combinations in the Cisco box that have NOWHERE near the raw throughput of a commodity modern cheapo consumer PC system.
So, your point about generations is right on - the reality is that a $500 PC might have many times the raw performance of that multi-thousand$ highly optimized network appliance device which is usually (for cost -and design continuity and other reasons) coasting on much older generations of hardware - because it doesn't NEED to be faster. And it often has expensive, specialized ASICs and network processors to make keeping pace with current generic CPUs even less necessary. By comparison, cheap PC can run a generic kernel and stack, lose a LOT to inefficiency and still potentially outperform the dedicated appliance. ( I have no doubt that if Cisco built all their appliances with 3GHz cpus with 1/2 gig of RAM, with all the other advantages they have there would be no comparison - but they generally don't)
So the question is, what's the cost benefit comparison between efficient/proprietary/expensive/dedicated and inefficient/generic-high-throughput/cheapPC systems, if the PC can perform well enough?
Cost effectiveness comes down to cases, but it is not, I suggest, a slam-dunk for the Cisco and other specialized boxes.