change interface name in Ubuntu

To rename interface eth0 to wan0, edit /etc/udev/rules.d/70-persistent-net.rules file and change

NAME="eth0" to NAME="wan0"

.

# PCI device 0x11ab:0x4363 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:00:00:00:00:00",ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="wan0"

link: https://www.shellhacks.com/change-network-interface-name-eth0-eth1-eth2/