LINUX.ORG.RU

Как сохранить маршрут в таблице маршрутизиции в арче?

 , ,


0

1

Чтобы после перезагрузки не слетал. Маршрут вида ip route add 1.1.1.1 via 192.168.0.1 dev eth0. В Debian есть файл /etc/network/interfaces, и в него можно добавить маршруты для сохранения. А в арче куда?

Всё зависит от того чем ты настраиваешь сеть, вот документация по NetworkManager: https://developer.gnome.org/NetworkManager/stable/NetworkManager.html

NetworkManager will execute scripts in the /etc/NetworkManager/dispatcher.d directory or subdirectories in alphabetical order in response to network events. Each script should be a regular executable file owned by root. Furthermore, it must not be writable by group or other, and not setuid.

pre-up The interface is connected to the network but is not yet fully activated. Scripts acting on this event must be placed or symlinked into the /etc/NetworkManager/dispatcher.d/pre-up.d directory, and NetworkManager will wait for script execution to complete before indicating to applications that the interface is fully activated.

up The interface has been activated.

В случае systemd-network:

[Route] Section Options
The [Route] section accepts the following keys. Specify several [Route] sections to configure several routes.

https://www.freedesktop.org/software/systemd/man/systemd.network.html

infomeh ★★ ()
Последнее исправление: infomeh (всего исправлений: 2)