LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-06-2006, 12:40 AM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Rep: Reputation: 30
Smile Patch o matic and debian kernel dir !


I never compiled the kernel and never applied a patch.I run debian sarge 3.1 stable but in /usr/src is empty.I want to patch-o-matic my kernel where is the kernel source directory as value of the KERNEL_DIR parameter: ... /boot ?
Thanks !
 
Old 05-06-2006, 07:45 AM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You probably do not have the actual kernel source code installed on the system. Use apt-get install kernel-source-2.X.X (make sure to replace X.X with the correct kernel version for your system).

Make sure that you've read and understand both of these before proceeding:
http://www.netfilter.org/documentati...O-2.html#ss2.2
http://www.debian.org/doc/manuals/re...kernel.en.html
 
Old 05-08-2006, 06:28 PM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
Thanks ! i'm also giving a look to the ipset package , do you know it ? If not, it's on the netfilter homepage !
http://ipset.netfilter.org/ipset-2.2.9-20060508.tar.bz2

But first Patch O Matic :
I have run the ./runme and asked me the kernel dir and than the iptables sourcecode dir which i don't have(or i haven't got idea where it is ), if i install with apt i do not have a soucedir for packages,right?) ,
Whit POM i'm at this stage :
root@argo:/usr/src/iptables-1.3.5# make KERNEL_DIR=/usr/src/kernel-headers-2.6.8-3-386
Making dependencies: please wait...
Something wrong... deleting dependencies.
make: *** [assert.h] Error 1

... So i Got a tarball from netfilter.org .I like the idea of compiling iptables POM ipset all in one go but in the first place happen things like the above error what's happening at the iptables'make ???

Last edited by gabsik; 05-08-2006 at 08:29 PM.
 
Old 05-08-2006, 10:50 PM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You need to run patch-o-matic first before you do any compiling. Before you run patch-o-matic you'll need to install the kernel sources. Use the apt-get command I posted above. It will download the kernel source and install it in the proper directory.

Make sure to follow the directions carefully. If you do this half-arsed there's a good likliehood of screwing your system up.
 
Old 05-11-2006, 08:15 PM   #5
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
I launched apt-get install kerner-source-2.6.8 that's my /usr/src/ :
root@argo:~# ls /usr/src/
kernel-patches kernel-source-2.6.8 kernel-source-2.6.8.tar.bz2 rpm

The kernel sourcee .tar.gz is there cause i tried compiling before,what next ?
 
Old 05-11-2006, 09:47 PM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Unpack the bzipped tarball in the /usr/src directory. When it is unpacked you should have a linux-2.6.8 directory. That will be your path when P-O-M prompts you.

Also, note that there were several known vulnerabilities in the original 2.6.8 kernels used by debian, so make sure that you've upgraded to the current version.
 
Old 05-12-2006, 03:06 AM   #7
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
I run
Quote:
root@argo:/usr/local/patch-o-matic# ./runme --batch base
i get
Quote:
Testing patch submitted/01_2.4.19.patch...
Warning - no help text file could be found in either
/usr/src/kernel-source-2.6.8/net/ipv4/netfilter/Config.help
or /usr/src/kernel-source-2.6.8/Documentation/Configure.help
Failed to patch copy of /usr/src/kernel-source-2.6.8
TEST FAILED: patch NOT applied.
pointing at
Quote:
/usr/src/kernel-source-2.6.8
as kernel dir ..........
 
Old 05-12-2006, 07:27 PM   #8
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Are you using patch-o-matic or patch-o-matic-ng?

What is in the /usr/src/kernel-source-2.6.8/ directory?
Do the /usr/src/kernel-source-2.6.8/net/ipv4/netfilter/Config.help and other file exist?
 
Old 05-13-2006, 04:33 AM   #9
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
It's patch-o-matic
Quote:
gabrix@argo:~$ ls /usr/src/kernel-source-2.6.8/net/ipv4/
af_inet.c ipcomp.c Kconfig tcp_minisocks.c
ah4.c ipconfig.c Makefile tcp_output.c
arp.c ip_forward.c netfilter tcp_timer.c
datagram.c ip_fragment.c proc.c udp.c
devinet.c ip_gre.c protocol.c utils.c
esp4.c ip_input.c raw.c xfrm4_input.c
fib_frontend.c ipip.c route.c xfrm4_output.c
fib_hash.c ipmr.c syncookies.c xfrm4_policy.c
fib_rules.c ip_nat_dumb.c sysctl_net_ipv4.c xfrm4_state.c
fib_semantics.c ip_options.c tcp.c xfrm4_tunnel.c
icmp.c ip_output.c tcp_diag.c
igmp.c ip_sockglue.c tcp_input.c
inetpeer.c ipvs tcp_ipv4.c
 
Old 05-13-2006, 09:14 AM   #10
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
That's likely the problem. For the 2.6 kernels you need to use patch-O-matic-ng.
 
Old 05-14-2006, 06:04 AM   #11
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
Where is your iptables source code? [/usr/src/iptables]

I hope that's the last question if i download an iptables and unpack it and use the dir as source dir ??? ... let's see !!!
 
Old 05-14-2006, 07:22 AM   #12
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Yup, just download the iptables source and unpack it. Enter the path to that dir (or just put the iptables source in /usr/src/iptables. Good luck and follow the directions carefully.
 
Old 05-14-2006, 05:09 PM   #13
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
Quote:
Excellent! Source trees are ready for compilation.
Now i only have to apply new features to my iptables script, isn'it ? ? ?
How can i see witch new features have applied and which not ?The questions list of new patch to apply don't seem much long i have used the ./runme --batch base ... i will look things better !!!

Last edited by gabsik; 05-14-2006 at 05:20 PM.
 
Old 05-14-2006, 06:50 PM   #14
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Quote:
Originally Posted by gabsik
Now i only have to apply new features to my iptables script, isn'it ? ? ?
Yes, once the patches have been applied you need to compile the kernel and kernel modules. For some of the netfilter patches you will need to specifically enable that feature when you do the configuration step of the kernel compilation. These options will appear in the networking section under netfilter.

Quote:
Originally Posted by gabsik
How can i see witch new features have applied and which not?
I believe if you re-run the runme script it will show which patches have already been applied (the patch will now appear as "applied".

Quote:
Originally Posted by gabsik
The questions list of new patch to apply don't seem much long i have used the ./runme --batch base ... i will look things
You only applied the "base" netfilter extensions. There is also the "extra", "pending", and "submitted" extensions. Note that many of those are experimental and currently do not work. So be careful when applying some of the other patches and definitely do not install all of them. For each patch you consider installing, make sure to check its status at the netfilter website.
 
Old 05-14-2006, 08:32 PM   #15
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
I go in the kernel-source-dir , run make menuconfig , i will find the new POM patches there , i will enable them , save and reload newkernel , right ?
 
  


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
patch-o-matic problem c0lin Linux - Security 3 06-16-2005 05:03 AM
problem with Patch-O-Matic nirav.jani Linux - Security 1 02-23-2005 09:22 AM
Patch-o-matic TTL Patch Knopper Fedora 1 02-02-2005 10:27 AM
Patch-o-Matic TTL Patch Knopper Linux - Networking 1 02-02-2005 09:27 AM
How to Install patch-o-matic(a iptables patch) on redhat 9? itebooks Linux - Security 1 07-23-2004 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:55 AM.

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