SIOCADDRT: Operation not permitted

  docker, routes

I’m a newbie with linux and I have a problem I don’t know how to resolve…
I needed to add the routing table to my device with this command:

```sudo ifconfig wlan0mon up netmask
    route add -net netmask gw```

I get this:

```SIOCADDRT: Operation not permitted```

What can I do to unlock this command?

So I did find two possible solutions and tried them but for the first command I get:

└─$ sudo docker exec --privileged container ip route add default via dev eth0 130 ⨯
sudo: docker: command not found

With the second method I get:

└─$ pid=($sudo docker inspect -f '{{.State.Pid}}' container) 127 ⨯

sudo mkdir -p /var/run/netns
sudo ln -s /proc/$pid/ns/net /var/run/netns/$pid

sudo ip netns exec $pid ip route add default via
ln: target 'container': No such file or directory
Cannot open network namespace "docker": No such file or directory

Can anyone help? Thank you in advance.

Source: Docker Questions