Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
I have iptables installed but the command "iptables" doesn't do anything. All I get is bash: iptables: command not found, which seems a little odd to me.
I am sure that I have iptables installed and have tried to configure it will webmin but I think something went wrong. Can anyone help me recover this please?
Bash is telling you it couldn't find iptables. So, or if it is not installed or it is not on your path. Iptables is generally installed on /usr/sbin; if you are trying to execute it from a normal user, probably you won't find it.
iptables should be in /usr/sbin/iptables, have you checked with whereis iptables? You may need to modprobe iptables if you have it compiled as a module and it does not load on boot.
Do this /sbin/iptables -h
That should work. You have iptables in /sbin/ which is not in your $PATH, it shouldn't be if you are not root. Are you sure that you have been root when you have been trying to access iptables? Cause iptables requires root access.
Just tried /sbin/iptables -h and it displayed a list of instructions Now I have /sbin/ in front of the commands it seems to work. The /sbin/iptables command and /sbin/iptables --list command work.
Should I update my $PATH and if so do you know how I should do this?
Are you sure that you are root when trying? Because here is the thing. /sbin is "super-user bin" and it is a dir with programs only for root, therefor root should have it in $PATH but a regular user should not. Whoever you are you can check you $PATH with echo $PATH.
Here is how you change $PATH.
Edit /root/.bashrc and add this line:
Code:
export PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
This line adds three sbin-dirs and at last the original path, to path. The reason we put it into the /root/.bashrc file is because now it will be updated every time you login as root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.