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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-24-2003, 12:30 AM
|
#1
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Rep:
|
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?
|
|
|
08-24-2003, 12:41 AM
|
#2
|
Member
Registered: Jul 2003
Distribution: Fedora 3
Posts: 133
Rep:
|
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
|
|
|
08-24-2003, 01:26 AM
|
#3
|
Member
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177
Rep:
|
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?
|
|
|
08-24-2003, 04:15 AM
|
#4
|
Member
Registered: Jun 2003
Location: Durham, UK
Distribution: Slackware 9, Mandrake 9.1
Posts: 163
Rep:
|
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?)
|
|
|
08-24-2003, 10:16 AM
|
#5
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Original Poster
Rep:
|
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.
|
|
|
08-24-2003, 10:55 AM
|
#6
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
Use the whereis command to find the location of iptables
|
|
|
08-24-2003, 12:22 PM
|
#7
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Original Poster
Rep:
|
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?
|
|
|
08-24-2003, 12:42 PM
|
#8
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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:
Hopefully, the /sbin will be present.
|
|
|
08-24-2003, 03:03 PM
|
#9
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Original Poster
Rep:
|
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...
|
|
|
08-24-2003, 03:11 PM
|
#10
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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
|
|
|
08-24-2003, 04:13 PM
|
#11
|
Member
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711
Original Poster
Rep:
|
yep that did it thanks a bunch ^_^
|
|
|
All times are GMT -5. The time now is 04:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|