Mailing List Archive

question in installing IPTABLES !!!!
Hi I have some questions about the iptables:

2) Download and tar gunzip de kernel-2.4.7.tar.gz, it makes de directory /linux, change the name to /linux-2.4.7 and make the simbolic link to linux, so the new kernel source is in /usr/src/linux

1) Download the iptables-1.2.2.tar.bz2, tar and bunzip2, it makes de directory /iptables-1.2.2, change to this directory and read de INSTALL instructions, I follow the instructions:
* make pending-patches KERNEL_DIR = /usr/src/linux

* make KERNEL_DIR = /usr/src/linux

* make install KERNEL_DIR = /usr/src/linux

2) Change to the /usr/src/linux directory and install de new kernel, with make xmenuconfig
I did all the steps to install the kernel and include into de kernel many options in the netfilter configuration:
-Network packet filtering
-Packet filtering options----->

3) When I boot the new kernel everything works fine, but If I write
$ iptables -L
the kernel didn't find the package, so I need to download and install the rpm version of iptables, with this it work fine

question 1) why I need to download the rpm version of iptables, it is not supose to work only with the step 1 below, and install the new kernel?

What I did wrong?

Thank you in advance
Re: question in installing IPTABLES !!!! [ In reply to ]
Alvaro Rosales Rodas wrote:

> Hi I have some questions about the iptables:
>
>
>
> 2) Download and tar gunzip de kernel-2.4.7.tar.gz, it makes de
> directory /linux, change the name to /linux-2.4.7 and make the
> simbolic link to linux, so the new kernel source is in /usr/src/linux
>
>
>
> 1) Download the iptables-1.2.2.tar.bz2, tar and bunzip2, it makes de
> directory /iptables-1.2.2, change to this directory and read de
> INSTALL instructions, I follow the instructions:
>
> * make pending-patches KERNEL_DIR = /usr/src/linux
>
>
>
> * make KERNEL_DIR = /usr/src/linux
>
>
>
> * make install KERNEL_DIR = /usr/src/linux
>
>
>
> 2) Change to the /usr/src/linux directory and install de new kernel,
> with make xmenuconfig
>
> I did all the steps to install the kernel and include into de
> kernel many options in the netfilter configuration:
>
> -Network packet filtering
>
> -Packet filtering options----->
>
>
>
> 3) When I boot the new kernel everything works fine, but If I write
>
> $ iptables -L
>
> the kernel didn't find the package, so I need to download and install
> the rpm version of iptables, with this it work fine
>
>
>
> question 1) why I need to download the rpm version of iptables, it is
> not supose to work only with the step 1 below, and install the new kernel?
>
>
>
> What I did wrong?
>
>
>
> Thank you in advance
>
>
>
Mr. Rodas,

What do you mean, "the kernel didn't find the package?" Are you
talking about a message
similar to the following:

bash2: iptables: No such file or directory

If so, then check your /usr/local/sbin directory. If a file named
iptables is present,
and you type the following command:

/usr/local/sbin/iptables

and iptables outputs an error message like the one below:

iptables v1.2.2: no command specified
Try "iptables -h" or "iptables --help" for more information.

then add this statement to your $PATH variable:

PATH=$PATH:/usr/local/sbin (bash2 statement)

To the coreteam: Should we add this to the FAQ?

Brad
RE: question in installing IPTABLES !!!! [ In reply to ]
Most likely you have two issues

you didn't upgrade your version of modutils - right now depmod doesn't know
about the netfilter directory. Get modutils-2.4.6 from www.kernel
<http://www.kernel> .org, compile and install it, rerun depmod. Now
modprobe can find ipchains.o and all the other good netfilter modules

or you can explicitly insert the module your using now:
insmod /lib/modules/default/fully/qualified/path/ipchains.o - but that
sucks.

now that you've upgraded your kernel and modutils, try iptables instead of
ipchains.
"modprobe ip_tables"

you wrote:
$ iptables -L

$ <-- that's a user prompt. Did you mean that?

try being #root...it's cool! :)
and make sure the binary is in your search path!!!


-j




-----Original Message-----
From: Alvaro Rosales Rodas [mailto:alvaro_rosales@ejje.com]
Sent: Tuesday, August 07, 2001 12:31 PM
To: netfilter
Subject: question in installing IPTABLES !!!!


Hi I have some questions about the iptables:

2) Download and tar gunzip de kernel-2.4.7.tar.gz, it makes de directory
/linux, change the name to /linux-2.4.7 and make the simbolic link to linux,
so the new kernel source is in /usr/src/linux

1) Download the iptables-1.2.2.tar.bz2, tar and bunzip2, it makes de
directory /iptables-1.2.2, change to this directory and read de INSTALL
instructions, I follow the instructions:
* make pending-patches KERNEL_DIR = /usr/src/linux

* make KERNEL_DIR = /usr/src/linux

* make install KERNEL_DIR = /usr/src/linux

2) Change to the /usr/src/linux directory and install de new kernel, with
make xmenuconfig
I did all the steps to install the kernel and include into de kernel
many options in the netfilter configuration:
-Network packet filtering
-Packet filtering options----->

3) When I boot the new kernel everything works fine, but If I write
$ iptables -L
the kernel didn't find the package, so I need to download and install the
rpm version of iptables, with this it work fine

question 1) why I need to download the rpm version of iptables, it is not
supose to work only with the step 1 below, and install the new kernel?

What I did wrong?

Thank you in advance
Re: question in installing IPTABLES !!!! [ In reply to ]
When you did make install for the iptables it probably installed
the binaries someplace outside of your PATH environment variable.
(I don't recall the default location for iptables to install itself.)
But lets say they installed to /usr/local/iptables/... then
trying to execute "iptables" would not work because it would
probably only be search for in the normal places...
/bin/iptables
/usr/bin/iptables
/usr/sbin/iptables
/usr/local/bin/iptables
/opt/bin
/usr/X11R6/bin

but *not* /usr/local/iptables/iptables

The redhat iptables RPMs are built with "./configure --prefix=/usr"
and other switches. this ultimately results in the binaries being
installed in /usr/sbin. /usr/sbin/iptables is then the binary that
is found and executed when you issue the "iptables" command.

- Jeff

Alvaro Rosales Rodas wrote:
> Hi I have some questions about the iptables:
>
>
>
> 2) Download and tar gunzip de kernel-2.4.7.tar.gz, it makes de directory
> /linux, change the name to /linux-2.4.7 and make the simbolic link to
> linux, so the new kernel source is in /usr/src/linux
>
>
>
> 1) Download the iptables-1.2.2.tar.bz2, tar and bunzip2, it makes de
> directory /iptables-1.2.2, change to this directory and read de INSTALL
> instructions, I follow the instructions:
>
> * make pending-patches KERNEL_DIR = /usr/src/linux
>
>
>
> * make KERNEL_DIR = /usr/src/linux
>
>
>
> * make install KERNEL_DIR = /usr/src/linux
>
>
>
> 2) Change to the /usr/src/linux directory and install de new kernel,
> with make xmenuconfig
>
> I did all the steps to install the kernel and include into de
> kernel many options in the netfilter configuration:
>
> -Network packet filtering
>
> -Packet filtering options----->
>
>
>
> 3) When I boot the new kernel everything works fine, but If I write
>
> $ iptables -L
>
> the kernel didn't find the package, so I need to download and install
> the rpm version of iptables, with this it work fine
>
>
>
> question 1) why I need to download the rpm version of iptables, it is
> not supose to work only with the step 1 below, and install the new kernel?
>
>
>
> What I did wrong?
>
>
>
> Thank you in advance
>
>
>