LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2003, 11:52 PM   #1
ryancw
LQ Newbie
 
Registered: Aug 2003
Distribution: Red Hat 9
Posts: 25

Rep: Reputation: 15
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.
 
Old 09-04-2003, 06:03 AM   #2
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Rep: Reputation: 30
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.
 
Old 09-04-2003, 08:40 AM   #3
ryancw
LQ Newbie
 
Registered: Aug 2003
Distribution: Red Hat 9
Posts: 25

Original Poster
Rep: Reputation: 15
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.
 
Old 09-04-2003, 10:07 AM   #4
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Rep: Reputation: 30
hm... very odd.
 
Old 10-18-2003, 10:15 AM   #5
ayana
LQ Newbie
 
Registered: Oct 2003
Location: USA
Distribution: Redhat 9
Posts: 5

Rep: Reputation: 0
Thumbs up 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.
 
Old 10-18-2003, 01:11 PM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
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
 
Old 10-18-2003, 01:19 PM   #7
ayana
LQ Newbie
 
Registered: Oct 2003
Location: USA
Distribution: Redhat 9
Posts: 5

Rep: Reputation: 0
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.
 
Old 10-18-2003, 02:26 PM   #8
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
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?
 
Old 10-18-2003, 09:16 PM   #9
ayana
LQ Newbie
 
Registered: Oct 2003
Location: USA
Distribution: Redhat 9
Posts: 5

Rep: Reputation: 0
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.
 
Old 10-18-2003, 09:19 PM   #10
ayana
LQ Newbie
 
Registered: Oct 2003
Location: USA
Distribution: Redhat 9
Posts: 5

Rep: Reputation: 0
DOH! forgive me. All I did was su then password. I reread your post then did su - password. It works great. THANKS!
 
Old 10-18-2003, 10:30 PM   #11
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
So you can run the iptables command now?
 
Old 10-19-2003, 08:31 AM   #12
ayana
LQ Newbie
 
Registered: Oct 2003
Location: USA
Distribution: Redhat 9
Posts: 5

Rep: Reputation: 0
Quote:
Originally posted by Capt_Caveman
So you can run the iptables command now?
Yes I can. Thanks again.
 
Old 10-19-2003, 01:38 PM   #13
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Cool. Glad to help out.

-CC
 
  


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
An error occured getting IPtables status from the command /etc/rc.d/init.d/iptables s CrazyMAzeY Linux - Newbie 10 08-12-2010 06:25 AM
bash: <command name> command not found smash Programming 5 03-13-2006 09:48 AM
iptables: command not found zivota Linux - Security 1 05-13-2005 07:23 PM
iptables command/iptables GUI? basketkase999 Linux - Security 5 04-12-2005 03:43 PM
iptables: command not found? GT_Onizuka Linux - Newbie 10 08-24-2003 05:13 PM


All times are GMT -5. The time now is 04:21 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration