Skip to content

Instantly share code, notes, and snippets.

@mpurzynski
Created September 14, 2018 20:02
Show Gist options
  • Select an option

  • Save mpurzynski/b492d88f2d93fcb51a6c3a2005b4f6aa to your computer and use it in GitHub Desktop.

Select an option

Save mpurzynski/b492d88f2d93fcb51a6c3a2005b4f6aa to your computer and use it in GitHub Desktop.
monitor_int_enp18s0f0.service
#cat /etc/systemd/system/monitor_int_enp18s0f0.service
[Unit]
Description=Configure monitor interfaces
Before=bro.service
Wants=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/ip link set enp18s0f0 promisc on arp off up
ExecStartPre=/usr/bin/ip link set enp18s0f0 mtu 9000
ExecStartPre=-/usr/bin/ethtool -G enp18s0f0 rx 512
ExecStartPre=-/usr/bin/ethtool -L enp18s0f0 combined 1
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 rx off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 tx off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 tso off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 ufo off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 gso off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 gro off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 lro off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 rxhash off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 ntuple off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 sg off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 txvlan off
ExecStartPre=-/usr/bin/ethtool -K enp18s0f0 rxvlan off
ExecStartPre=-/usr/bin/ethtool -C enp18s0f0 adaptive-rx on rx-usecs 100
ExecStartPre=-/usr/bin/ethtool -G enp18s0f0 rx 512
ExecStartPre=-/usr/bin/ethtool -A enp18s0f0 rx off tx off
ExecStartPost=-/usr/bin/bash -c "echo 1 > /proc/sys/net/ipv6/conf/enp18s0f0/disable_ipv6"
ExecStop=/usr/bin/ip link set enp18s0f0 promisc off arp off down
RemainAfterExit=yes
SuccessExitStatus=1
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment