On a dell pc, the only ethernet interface off the motherboard shows up as em1.
On a newer supermicro server, the interface names are enp137s0f0
On some older supermicro servers, they are eth0..eth3
In setting up a firewall (RHEL/Centos 7) I need to create a zone and bind it with the correct interface name: eth0, em1, enp137s0f0.
In writing a script what is the best way on any given hardware, with the OS being RHEL/CentOS 7, to get the active interface name?
Why do they vary? Is there a way to make everything just eth0..eth# ?
I need to do firewall-cmd --permanent --zone=mycustomezone --change-interface=???