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


```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