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?
|
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 |
Re: iptables: command not found?
Quote:
|
make sure the iptables directory is in your PATH variable, if it isnt already. try:
Code:
PATH=$PATH:<directoryname> |
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.
|
Use the whereis command to find the location of iptables
Code:
whereis iptables |
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? |
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 |
yeah i am running as root and i think when i did the command you suggested the results are rather ungood :p
/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... |
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 |
yep that did it thanks a bunch ^_^
|
All times are GMT -5. The time now is 06:07 PM. |