#!/bin/bash
mtu=$1
# change the mtu of all interfaces other than tap interfaces that are used for pfsense and the mtu of the
# outbound wan interface
IFACES=$(ip -o link show | awk -F': ' '{print $2}' | grep -Ev lo | grep -Ev tap | grep -Ev ens192)
for iface in $IFACES; do
        ifconfig ${iface} mtu ${mtu}
done