LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-24-2003, 12:30 AM   #1
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Rep: Reputation: 31
iptables: command not found?


okay im trying to configure mah firewall using iptables but for some reason it keeps telling me the command cannot be found. i checked in my service configuration thing and it says iptables is running (unfortunately not with the settings i want) and i can see while my computer is booting up/shutting down that it starts/stops iptables respectively. anyone know whats up?
 
Old 08-24-2003, 12:41 AM   #2
jqcaducifer
Member
 
Registered: Jul 2003
Distribution: Fedora 3
Posts: 133

Rep: Reputation: 15
Maybe your kernel isn't set up right.

Go to /usr/src/linux
become root
type "make xconfig"
select the tab Networking Options
make sure "Network packet filtering" is enabled

for more iptables options, scroll down to the tab "IP: Netfilter Configuration"

If "Network packet filtering" isn't enabled, you have to enable it, and recompile the kernel. Search around for how to
 
Old 08-24-2003, 01:26 AM   #3
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
Re: iptables: command not found?

Quote:
Originally posted by GT_Onizuka
okay im trying to configure mah firewall using iptables but for some reason it keeps telling me the command cannot be found.

which command?

i checked in my service configuration thing and it says iptables is running (unfortunately not with the settings i want) and i can see while my computer is booting up/shutting down that it starts/stops iptables respectively. anyone know whats up?
Are you trying to run your own firewall?
 
Old 08-24-2003, 04:15 AM   #4
Tesl
Member
 
Registered: Jun 2003
Location: Durham, UK
Distribution: Slackware 9, Mandrake 9.1
Posts: 163

Rep: Reputation: 30
make sure the iptables directory is in your PATH variable, if it isnt already. try:

Code:
PATH=$PATH:<directoryname>
(EDIT - i think i might have read this wrong. Do you mean the command isnt working, or you just dont know the name of the command itself?)
 
Old 08-24-2003, 10:16 AM   #5
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 31
i know the name of the command and i have a book that tells me what i need to put in to make my own rules for a firewall. on a previous install it worked without a single problem. but, for some reason, this time it says the command iptables is not found.
 
Old 08-24-2003, 10:55 AM   #6
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Use the whereis command to find the location of iptables
Code:
whereis iptables
 
Old 08-24-2003, 12:22 PM   #7
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 31
iptables: /sbin/iptables /lib/iptables /usr/share/man/man8/iptables.8.gz

this is what it gives me. do i have to be in one of these directories for iptables to work or something?
 
Old 08-24-2003, 12:42 PM   #8
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
No.
I just wanted to make sure that iptables was installed correctly.

First of all, are you logged-in as root when you try to use the command ?
By default, only root has the /sbin directory in its path.
As root, type:
Code:
echo $PATH
Hopefully, the /sbin will be present.
 
Old 08-24-2003, 03:03 PM   #9
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 31
yeah i am running as root and i think when i did the command you suggested the results are rather ungood

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/ynadji/bin

i dont see /sbin, which you were talking about earlier. im just wondering wtf i did...
 
Old 08-24-2003, 03:11 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you are suing to root the use:
su -

Not:
su

This loads root's paths which includes /sbin without that you can run:
/sbin/iptables
 
Old 08-24-2003, 04:13 PM   #11
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 31
yep that did it thanks a bunch ^_^
 
  


Reply



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 05:25 AM
bash: <command name> command not found smash Programming 5 03-13-2006 08:48 AM
iptables: command not found zivota Linux - Security 1 05-13-2005 06:23 PM
iptables command/iptables GUI? basketkase999 Linux - Security 5 04-12-2005 02:43 PM
iptables command not found ryancw Linux - Newbie 12 10-19-2003 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:02 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
Open Source Consulting | Domain Registration