K
K
Konkase2014-08-18 15:32:48
linux
Konkase, 2014-08-18 15:32:48

How to create ip rule not from under root?

Good afternoon. There is access only to / sbin / ip, you need to add several ip rule and ip route using table, but there is no access to the file /etc/iproute2/rt_table and ip route swears that the table does not exist
How to do this not from under root? Maybe you can specify a file that will be instead of rt_table

-bash-3.2$ sudo /sbin/ip route add 192.168.0.0/24 dev eth0 src 192.168.0.1 table telecom
Error: argument "telecom" is wrong: "table" value is invalid

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Valentin, 2014-08-18
@vvpoloskin

No way, the routing change goes through the kernel. If only through sudo

S
Sergey Petrikov, 2014-08-19
@RicoX

In the normal version, there’s no way, you can try to pile up a routing control crutch from a user mod, such a trick with your ears allows, as far as I know, SoftEtherVPN, but I won’t say how much it requires a file right away, it’s easier to get root access or set up sudo.

E
ejka, 2014-08-19
@ejka

The names in rt_tables are for user convenience only and are used only by the ip program itself. If there is no name in rt_tables, you can add rules to the table by its number:
sudo /sbin/ip route add 192.168.0.0/24 dev eth0 src 192.168.0.1 table 10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question