How to set the promiscusing netplan in Ubuntu 20.04 and 22.04 and make the flag appear after a restart

958 Views Asked by At

How to set the promisc flag on a network interface using netplan in Ubuntu 20.04 and 22.04 and make the flag appear after a restart.

Please suggest a solution using netplan or in another way (Through a script and adding it to the scheduler is not suitable, as well as creating a service)

This task turned out to be implemented, only with the help of service:

[Unit]
Description=Set promiscuous mode on network interface
After=network.target

[Service]
ExecStart=/sbin/ip link set dev eth0 promisc on

[Install]
WantedBy=default.target
0

There are 0 best solutions below