I want to run the
iptables command in a Ubuntu 16.04 Docker container. I have created a user, given that user root permissions, added them to the
sudo group, but I am still being told that I am not running
iptables as root.
$ groups stack root sudo $ sudo whoami root $ sudo iptables --list iptables v1.6.0: can't initialize iptables table `filter': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded.
/etc/sudoers file I have the line:
%sudo ALL=(ALL:ALL) ALL, which I believe should allow any user in the
sudo group (which I am) to run any command, but I still get the permission denied error.
How would I successfully run the
iptables command as this user?
Please note I am doing this in a Docker container with image: