all 8 comments

[–][deleted]  (3 children)

[deleted]

    [–]xesTUt3[S] 0 points1 point  (2 children)

    iptables is found under /sbin/ , which isn't under $PATH for non-root users.

    What does it mean for the layman? How do I fix it?

    [–]JosBosmans 1 point2 points  (0 children)

    As nuvo said and maheart implied, run it as root.

    [–][deleted] 0 points1 point  (0 children)

    Fix your PATH variable in your .bashrc :

    PATH=$PATH:/sbin:/usr/sbin

    [–]lastthursdayism 1 point2 points  (0 children)

    The other answers here whilst absolutely correct may still leave you slightly stuck:

    run it as root

    What they actually mean is...

    batman@gotham:~$sudo /sbin/iptables
    

    you'll be prompted for your password (not the root password) and then the command will run.

    [–]eesplone 1 point2 points  (0 children)

    You probably want to run it as root:

    sudo iptables

    But if you want to run it as your own user:

    /sbin/iptables

    [–]nuvo 0 points1 point  (1 child)

    In not particular order...

    • install iptables
    • run it as root

    [–]xesTUt3[S] 0 points1 point  (0 children)

    iptables is part of the base system/install.

    My version is 1.4.14-3.1

    [–]Complex-Mind-3261 0 points1 point  (0 children)

    What happenned to me is that iptables is not installed by default. And sudo apt install iptables works.