Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 25, 2004 4:58 pm 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
Well I'm trying to filter based on certain strings in packets and I can't get it to work, which led me to sites suggesting I need to recompile my kernel with a few options (netfilter etc)

My main question then is more along the lines of how you do this on a linode.

I have compiled countless kernels from scratch, but I do not know what be needed on the linode, I have not messed with my kernel and I think you guys use some special kernels, I wouldn't want to disable anythign important.

The distro is Gentoo, so how would I go about building a kernel for this box with netfilter?

Or maybe someone knows how I can do this without recompiling the kerrnel? Thanks!

Thanks!


Top
   
 Post subject:
PostPosted: Wed Aug 25, 2004 5:19 pm 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
On linode you can not run your own kernel.

Adam


Top
   
 Post subject:
PostPosted: Wed Aug 25, 2004 5:21 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Most, if not ALL of the netfilter options are enabled inside the kernel config, except for those labelled experimental.

http://www.linode.com/forums/viewtopic.php?t=1006

Can you tell me which .config options you need specifically?

-Chris


Top
   
 Post subject:
PostPosted: Thu Aug 26, 2004 8:34 am 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
Hmm I did a bit of research and it looks like nefilter has patches for the kernel source that you need to patch in for some of these options.

Specifically it is:

CONFIG_IP_NF_MATCH_STRING which allows you to
match a string in a whole packet.

Referenced at:
http://www.knowplace.org/netfilter/ipt_compile.html#ip2

Not sure if this is doable with the linode kernels but I would really like to find a way to drop packets based on strings in their payload.


Top
   
 Post subject:
PostPosted: Thu Aug 26, 2004 6:12 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Crisis wrote:
...I would really like to find a way to drop packets based on strings in their payload.


No, you wouldn't. It's unreliable, because it only looks at a packet at a time, and there's no guarantee that the dangerous string "foobar" won't be split across two packets. It can happen accidentally, and the cracker can force it.

What you want is a proxy firewall, where you can look at the actual data stream, and parse it properly.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Fri Aug 27, 2004 8:27 am 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
Well for now I achieved what I was trying to do on the application layer, but what would you recommend for a proxy firewall?


Top
   
 Post subject:
PostPosted: Sun Aug 29, 2004 10:19 am 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Hmmm, I'm not sure there are any free proxy firewalls that can do reject based on the contents of the data stream. Probably you can write add-ins for SOCKS to do it. But if you've solved your problem at the application layer, then you're done: proxy firewalls *are* at the application layer.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.

-- seen on the net


Top
   
 Post subject:
PostPosted: Mon Aug 30, 2004 10:03 am 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
OK thanks for the response ;)

I figured the application layer would be the easiest to do it on but I thought it might be interesting to learn how to do it a bit lower with a firewall.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group