[[+content_image]]
D
D
Dana2018-10-09 17:34:20
openvpn
Dana, 2018-10-09 17:34:20

Can OpenVPN change metrics in the routing table?

The other day I noticed that on one server the metric in the routing table has changed.

[[email protected] /home]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    100    0        0 ens33
10.8.50.0       10.8.50.2       255.255.255.0   UG    0      0        0 tun0
10.8.50.2       0.0.0.0         255.255.255.255 UH    0      0        0 tun0

The ens33 interface had a different metric value.
This happened after installing OpenVPN server.
Can OpenVPN change metrics in the routing table? Or is it a coincidence and changes routes, something else?
Since metric 0 for the OpenVPN tunnel does not suit me, I added the line to server.conf:
route-metric 100
After the restart, the value in the table has changed.
[[email protected]_50 rsync-scripts]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    100    0        0 ens33
10.8.50.0       10.8.50.2       255.255.255.0   UG    100    0        0 tun0
10.8.50.2       0.0.0.0         255.255.255.255 UH    0      0        0 tun0

But the metric for 10.8.50.2 has not changed. How to change it?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
ky0, 2018-10-09
@ky0

It is more appropriate to ask the question - "why change it and why this route does not suit you"? VPN is used either to taxi certain subnets through itself - and then, obviously, the routes to them should have a lower metric, or to taxi everything except the connection to the VPN server through itself - and then, again, its routes should have a lower metric than the existing ones .

A
Andrey Burov, 2015-07-01
@BuriK666

It will be the same.

$array = array (
 'текст 1', 
 'текст 2', 
 'текст 3', 
 'текст 4', 
 'текст 5'
 );
var_dump($array);
/* array(5) {
  [0] =>
  string(12) "текст 1"
  [1] =>
  string(12) "текст 2"
  [2] =>
  string(12) "текст 3"
  [3] =>
  string(12) "текст 4"
  [4] =>
  string(12) "текст 5"
} */

A
Andrew, 2015-07-01
@Ashlst

Indexed arrays without a key

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question