Re: [SLUG] IP MASQ & VPN

From: Tim Spalding (dominus@tampabay.rr.com)
Date: Thu Apr 12 2001 - 00:04:40 EDT


Brian S. Armstrong wrote:

> RedHat 6.22 w/kernel 2.2.14-5.0 and using ip masquerading to provide a
>
> I have found several howto's online pertaining to getting VPN to go through
> ip masquerading. All of them state that I need to patch the kernel with the
> following command:
> zcat ip_masq_vpn.patch.gz | patch -l -p0 > vpn-patch.log 2>&1
>
> Where the patch file is the ip_masq_vpn.patch.gz file. I have downloaded
> the latest version of this file and placed it in the correct directory
> according to the howto's. When I try to execute the above command, while
> under /usr/src (as the howto states to do it), in the vpn-patch.log file I
> get the following message:
>
> <snip>
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |*** ip_masq.c.orig Sat Nov 13 19:15:18 1999
> |--- ip_masq.c Mon Nov 15 17:03:24 1999
> --------------------------
> File to patch:
> Skip this patch? [y]
> Skipping patch.
> 2 out of 2 hunks ignored
> </snip>
>
> I am at a loss. None of the online documentation I have been able to find
> has any information about this error. Does anyone have any ideas?

Ah. Well, like the error message says, you tried to apply the patch in the
wrong place. With a later 2.2 kernel on a Red Hat system, you probably want to
apply the patch to (run the command from within) /usr/src/linux/net/ipv4/ since
that's where all the other masquerading stuff seems to live.

Since the IP masquerading code itself is being patched, re-building your kernel
should do the trick.

Slightly wandering from the topic at hand, you might want to consider looking
for a more recent kernel package. You say you're running 2.2.14, but from what
I've read you should probably be running at least 2.2.17. The 2.2.16 release
fixed a LOT of security problems, as I recall, and 2.2.17 fixed many (most?) of
the bugs and rough spots that got out in 2.2.16. And of course the current
version is 2.2.19 with additional goodies. I haven't kept track of the Red Hat
releases, but I can tell you that if Red Hat doesn't have a current package you
can use, Mandrake does. Look on one of the mirror sites for a kernel22-source-*
package. That should likely get you most of where you need to go.

Hope it helps. Good luck!



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:33:36 EDT