Article 5GAW0 SIOCADDRT Operation not permitted

SIOCADDRT Operation not permitted

by
wallybok
from LinuxQuestions.org on (#5GAW0)
I'm a newbie with linux and I have a problem I don't know how to resolve... I'm using kali linux and I needed to add the routing table to my device with this command:

```sudo ifconfig wlan0mon up 192.168.1.1 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1```

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:

Code
(kalikali)-[~/fap]
$ sudo docker exec --privileged container ip route add default via 192.168.1.0 dev eth0 130
sudo: docker: command not found

and with the second method I get:

Code
(kalikali)-[~/fap]
$ 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 192.168.1.0
ln: target 'container': No such file or directory
Cannot open network namespace "docker": No such file or directory
latest?d=yIl2AUoC8zA latest?i=FgEbAaB3A54:hwGEkwX5hG0:F7zBnMy latest?i=FgEbAaB3A54:hwGEkwX5hG0:V_sGLiP latest?d=qj6IDK7rITs latest?i=FgEbAaB3A54:hwGEkwX5hG0:gIN9vFwFgEbAaB3A54
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments