iptables : command not found

I am trying to learn some iptables stuff, but seems I don't have it installed on 16.04 Ubuntu.

mypc@ubuntu:~$ iptables
-bash: iptables: command not found

How to fix this?

1 Answer

iptables needs a root priviledges. Seems like you are trying to execute it as a normal user.

so: sudo iptables

Also, check are iptables loaded in the kernel:

lsmod | grep ip_tables

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like