LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   iptables command not found (https://www.linuxquestions.org/questions/linux-newbie-8/iptables-command-not-found-89050/)

ryancw 09-03-2003 10:52 PM

iptables command not found
 
Trying to set up a firewall with iptables. Only had Linux 2 weeks. Running RH9.

Found under "Services" dialog box that ipchains was checked to run, but was listed as "incompatible with this kernel." I understand from RH website that ipchains will interfere with iptables. So I stopped ipchains and restarted iptables.

then went to terminal, changed to su
any command that I type that begins with iptables is met with an error message, "iptables command not found"

What am I doing wrong?

Thanks.

neenee 09-04-2003 05:03 AM

though you probably have iptables support and
functions compiled into your kernel or as modules,
you might not have iptables installed yet.

go to rpmfind.net and get the rpm there.

good luck.

ryancw 09-04-2003 07:40 AM

had to be logged in as root
 
I may have stumbled upon the solution. Seems I had to be acutally logged in from the get-go as root. Typing su in the terminal window didn't do the trick. But when I logged out, returning the the RH login screen, and then logged in as root, iptables worked fine.

neenee 09-04-2003 09:07 AM

hm... very odd.

ayana 10-18-2003 09:15 AM

Re: had to be logged in as root
 
Quote:

Originally posted by ryancw
I may have stumbled upon the solution. Seems I had to be acutally logged in from the get-go as root. Typing su in the terminal window didn't do the trick. But when I logged out, returning the the RH login screen, and then logged in as root, iptables worked fine.

Thank You! I had this same problem and it was driving me crazy. I logged in as root and it works fine.

Capt_Caveman 10-18-2003 12:11 PM

I think what you were looking for is su -
That has the same effect as logging in as root. Simply doing su by itself doesn't give you access to all of the root commands. Plus doing su - is alot easier than logging in and out every time you want to do something as root.
HTH

ayana 10-18-2003 12:19 PM

Did not work using su -
Yes, it is a pain logging in and out. I am using RH 9. Maybe I am doing something wrong.

Capt_Caveman 10-18-2003 01:26 PM

Possibly. How are you entering the command? Like this:

$ su -

to which Linux should ask you for the root password:

[foo@foobar]$ su -
Password:

After you enter the root password, if you type whoami and press enter, what does it say? Do you get any errors throughout the process?

ayana 10-18-2003 08:16 PM

Thats how I do it.
whoami shows root

However, I can not do alot of commands. It tells me, command not found.
Whereas, if I log right in as root I have no problem at all. Maybe it's a RH thing. Thank you for the help. :)

ayana 10-18-2003 08:19 PM

DOH! forgive me. All I did was su then password. I reread your post then did su - password. It works great. THANKS!

Capt_Caveman 10-18-2003 09:30 PM

So you can run the iptables command now?

ayana 10-19-2003 07:31 AM

Quote:

Originally posted by Capt_Caveman
So you can run the iptables command now?
Yes I can. Thanks again. :)

Capt_Caveman 10-19-2003 12:38 PM

Cool. Glad to help out.

-CC


All times are GMT -5. The time now is 03:41 AM.