LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2005, 11:07 AM   #1
servnov
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2
Posts: 276

Rep: Reputation: 30
Can you block programs (like p2p) by protocol examining?


Let's say you want to block a p2p network client on your network. You could close down the port it uses, but then the user can change to a different port and still use the program. You could setup a firewall blocking all incoming communication so the client app can't upload, but still should be able to download.

Is it possible to identify the protocol unique to this file-sharing network regardless of ports being used to block it? How do administrators block all p2p tracffic (even bit-torrents) while still allowing ssh, ftp, http, etc?
 
Old 10-02-2005, 02:59 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
That's a very, very hard thing to do. Worst thing is, new p2p programs automatically search for open ports to connect if the ports they use by default are closed. That means the user not even has to worry about going to preferences and changing the ports. What you could do is:

1 - Add all users you don't want to connect with a p2p, to be part of a given group. Make that group not able to execute p2p executables.

2 - Limit their bandwidth... make them suffer . Well, not quite. Take a look in Linux Advanced Routing and Traffic Control (LARTC) for solutions for this:

http://www.lartc.org/

Regards!
 
Old 10-02-2005, 03:43 PM   #3
servnov
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2
Posts: 276

Original Poster
Rep: Reputation: 30
On this hypothetical network there will be ethernet ports open that someone can come up to and plug in a laptop. Would routing all http, ftp traffic thru a proxy server and dening everything not going thru a proxy work? Thanks for the response, I guess protocol examining must be extremely difficult and never done.
 
Old 10-02-2005, 04:33 PM   #4
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
There are some projects that do protocol examining.

As Mega Man X it is a difficult thing to do and it depends on the protocol.
Some protocols are easy to find, some are not.

The most active projects are:

Layer 7 packet classifier (http://l7-filter.sourceforge.net/)
IP2P project (http://netfilter.org/patch-o-matic/p...om-extra-ipp2p)

The pages mention which protocols are supported and which are not.
Both have simple iptables match syntax and work ok.

It works ok for me, but i have a small network and the only traffic is eMule, so i don't know how well it works.

But, if you want to do simple bandwidth shaping i guess it should work.

Also, about the thing you said ("You could setup a firewall blocking all incoming communication so the client app can't upload, but still should be able to download.")

You need an incoming connection to download also.

I hope i helped.
 
  


Reply



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 how to block p2p (missing ipp2p) Neze Linux - Networking 1 02-01-2005 01:33 PM
IPTables to block IP protocol ppuru Linux - Security 3 06-26-2004 02:20 AM
Is that a good thing to block ICMP protocol on a Web server? Iced Earth Linux - Security 2 06-15-2004 06:49 AM
p2p programs RIgimp75 Linux - Software 2 09-03-2003 09:40 PM
block p2p tcby Linux - Security 1 10-28-2001 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:32 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
Open Source Consulting | Domain Registration