Netplan Manual Interface mit promisc Modus

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

yaml-Datei

  • vi /etc/netplan/01-netcfg.yaml
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
      accept-ra: no
      optional: true
  • netplan apply

service-Datei

  • vi /etc/systemd/system/promisc-mode.service
[Unit]
Description=Enable promiscuous mode on eth0
After=network.target

[Service]
ExecStart=/sbin/ip link set eth0 promisc on
ExecStop=/sbin/ip link set eth0 promisc off
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target