iptables v1.6.0: can't initialize iptables -F: Permission denied (you must be root)

0 votes

Hi Guys,

I am trying to run iptables program inside docker container, but it shows me the below error.

iptables v1.6.0: can't initialize iptables -F: Permission denied (you must be root)

How can I solve this error?

May 12 in Docker by akhtar
• 25,030 points
979 views

1 answer to this question.

0 votes

Hi@akhtar,

You may get this error, if you didn't give permissions to your container at the time of launching. You can use the below tag at the time of docker run.

$ docker run -it --privileged centos

Hope this will help.

answered May 12 by MD
• 56,480 points

Related Questions In Docker

0 votes
1 answer

Error saying "E: This command can only be used by root." while installing docker

Try executing the following command: sudo su and ...READ MORE

answered Aug 6, 2019 in Docker by Ahmad
1,964 views
0 votes
1 answer

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)

Hi@akhtar, To install any software using non root ...READ MORE

answered Jun 6 in Docker by MD
• 56,480 points
1,652 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,640 points
775 views
0 votes
1 answer

-su: cd: /root/: Permission denied

Hi@akhtar, You are trying to run your command ...READ MORE

answered Jun 6 in Docker by MD
• 56,480 points
1,133 views
0 votes
1 answer

error: permission denied in docker ?

Hi@akhtar, This is because of docker permission for ...READ MORE

answered Mar 23 in Docker by MD
• 56,480 points
1,458 views