LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-20-2007, 05:56 AM   #1
javedmk80
LQ Newbie
 
Registered: Sep 2007
Location: Pakistan
Distribution: Red Hat Enterprise Linux 4.0 AS. CentOS 4.5, CentOS 5.0
Posts: 11

Rep: Reputation: 0
Can I patch my existing kernel?


Hello List:

I am working in RHEL 4.0 AS. I want to load balance two ISPs through a software Shorewall. I have successfully installed shorewall. I also installed SQUID2.6 from source code. I have then configured shorewall with all the necessary entries. but when I did /etc/init.d/shorewall start, I received the following error:
--------------------------------------------------------
Compiling...
Compiling /etc/shorewall/zones...
Compiling /etc/shorewall/interfaces...
Determining Hosts in Zones...
Preprocessing Action Files...
Pre-processing /usr/share/shorewall/action.Drop...
Pre-processing /usr/share/shorewall/action.Reject...
Compiling Kernel Route Filtering...
Compiling Martian Logging...
Compiling /etc/shorewall/providers ...
ERROR: the provider 'track' option requires Connmark Match in your kernel and iptables
--------------------------------------------------------
I also downloaded the patch for kernel (its something like CONNMARK.diff), but I don't know how to incorporate it with my kernel.
By the way the 'uname -r' command gives the kernel ver as 2.6.9-42.EL.

Can someone plz. tell me the solution of patching my kernel? Do I have to compile a newly downloaded kernel? Or is there a short-cut just to solve this connmark problem? Plz. advise...

TIA.

--
Javed
 
Old 09-20-2007, 06:08 AM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Connmark Match should already be built into the kernel, however it may not be enabled or 'built' in your specific kernel configuration.
Before figuring you need to patch something, why not load up menuconfig or xconfig, load your running kernel's configuration into it, and have a look in the NET section(s) and see if you simply need to tick the box for Conn-Match and recompile the kernel.
The kernel has LOADS of networking features and options, and only a small portion of them are enabled by default.
NOTE: I am basing this advice on general knowledge of the kernel structure and usual features configured. I don't use RHEL personally, but typically the kernel is the kernel is the kernal.

So, navigate to your kernel sourcecode folder and with a console (or from the console) type 'make menuconfig' or 'make xconfig' and load the running config into it, and have a look.

EDIT: If need be, it's a relatively simple matter to patch a C file, however patching the file won't do anything for you if the file isn't being used anyways (not enabled in config) and if you DO need to patch the file for some reason, then you will STILL need to rebuild the kernel anyway.

Last edited by GrapefruiTgirl; 09-20-2007 at 06:10 AM.
 
Old 09-21-2007, 07:56 PM   #3
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Try

Code:
$ modprobe -l *connmark
$ modprobe -l *CONNMARK
You may (should?) have both these available as loadable modules in your kernel.
 
Old 09-22-2007, 02:04 AM   #4
javedmk80
LQ Newbie
 
Registered: Sep 2007
Location: Pakistan
Distribution: Red Hat Enterprise Linux 4.0 AS. CentOS 4.5, CentOS 5.0
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you both of you (Grapefruitgirl & jcliburn). But the strange thing in RHEL 4 is I can't find kernel's installation path/directory as most of linux users suggest (i.e. /usr/src/Linux*

In my src/ I find /src/redhat/SOURCES and /src/redhat/SPECS. Due to this, I have no option of loading or recompiling my existing kernel & making changes into it. Can you plz tell me the command to find where the kernel would be installed?

Besides $ modprobe -l *connmark and $ modprobe -l *CONNMARK didn't return anything.. (by the way, what is this command used for?)

Plz advise...

Last edited by javedmk80; 09-22-2007 at 02:29 AM.
 
Old 09-22-2007, 02:53 AM   #5
jdiggitydogg
Member
 
Registered: Sep 2007
Posts: 42

Rep: Reputation: 15
modprobe has a man page.
 
Old 09-22-2007, 04:58 AM   #6
javedmk80
LQ Newbie
 
Registered: Sep 2007
Location: Pakistan
Distribution: Red Hat Enterprise Linux 4.0 AS. CentOS 4.5, CentOS 5.0
Posts: 11

Original Poster
Rep: Reputation: 0
I went thru the mans of modprobe but as I said, it didn't return anything useful; so obviously that module is not present.

Can someone please provide a reliable solution to my problem...

Thank you
 
Old 09-22-2007, 05:44 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,286

Rep: Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029
Config files are usually copied to /boot - have a look for something obvious with your current `uname -r` in the name. Grep it for "connmark".
Else if you're lucky, they'll have enabled /proc/config.gz - try zgrep on that.
 
Old 09-22-2007, 08:06 AM   #8
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Kernel modules are found in /lib/modules/`uname -r`/kernel. You can see all the netfilter (iptables) modules that are installed for your kernel by looking inside this directory:

/lib/modules/`uname -r`/kernel/net/netfilter

The kernel itself is found in /boot and is called vmlinuz.

If you're looking for the kernel source code, it's likely not installed unless you installed it yourself. It's not installed by default. If it *were* installed, it'd be at /usr/src/redhat/BUILD.

Last edited by jcliburn; 09-22-2007 at 08:06 PM.
 
Old 09-24-2007, 02:10 AM   #9
javedmk80
LQ Newbie
 
Registered: Sep 2007
Location: Pakistan
Distribution: Red Hat Enterprise Linux 4.0 AS. CentOS 4.5, CentOS 5.0
Posts: 11

Original Poster
Rep: Reputation: 0
Yes, you were right, it wasn't installed. I had to download and install a brand new kernel (kernel2.6.22.6) in order to get my job done.

Now, I pray & hope my shorewall CONNMARK problem might get solved for load balancing 2 ISP connections...
 
Old 09-24-2007, 05:09 AM   #10
javedmk80
LQ Newbie
 
Registered: Sep 2007
Location: Pakistan
Distribution: Red Hat Enterprise Linux 4.0 AS. CentOS 4.5, CentOS 5.0
Posts: 11

Original Poster
Rep: Reputation: 0
Well, finally I was successfull in installing my kernel. Now its shorewall's turn: it gives error msgs when I run /etc/init.d/shorewall start
---------------------------------------
Compiling...
Compiling /etc/shorewall/zones...
Compiling /etc/shorewall/interfaces...
Determining Hosts in Zones...
Preprocessing Action Files...
Pre-processing /usr/share/shorewall/action.Drop...
Pre-processing /usr/share/shorewall/action.Reject...
Compiling /etc/shorewall/policy...
Compiling Kernel Route Filtering...
Compiling Martian Logging...
Compiling /etc/shorewall/providers ...
Compiling /etc/shorewall/masq...
Compiling MAC Filtration -- Phase 1...
Compiling /etc/shorewall/rules...
Generating Transitive Closure of Used-action List...
Processing /usr/share/shorewall/action.Reject for chain Reject...
Processing /usr/share/shorewall/action.Drop for chain Drop...
Compiling MAC Filtration -- Phase 2...
Applying Policies...
Generating Rule Matrix...
Use of uninitialized value in string ne at /usr/share/shorewall-perl/Shorewall/Rules.pm line 1424.
Use of uninitialized value in hash element at /usr/share/shorewall-perl/Shorewall/Rules.pm line 1425.
ERROR: No policy defined for zone fw to zone net
---------------------------------------
I have configured Shorewall as on http://www.shorewall.net/MultiISP.html#Example1

Can someone plz tell me how to load balance two DSL connections using Shorewall? (both are 1MB each)

TIA

Last edited by javedmk80; 09-24-2007 at 05:11 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
HowTo patch this patch on 2.6 kernel kushalkoolwal Linux - Kernel 3 08-24-2007 12:01 PM
How do i patch 2.4.21-37 kernel with antidote2 security patch suchi Linux - Kernel 4 09-05-2006 02:29 AM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 06:33 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM
HowDo I replace my existing kernel with a precompiled distro kernel ? gmartin Slackware 1 01-06-2004 09:46 PM


All times are GMT -5. The time now is 08:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration