# OpenWrt ## Contents ## How to override the WAN MAC address My ISP's fiber optic modem refused to let any device connect unless it had a specific [MAC address](!W). When I got a [TP-Link Archer C7 AC1750](https://openwrt.org/toh/tp-link/archer-c5-c7-wdr7500) router and installed OpenWRT on it, this proved a problem. The MAC address I set through the web interface did not actually override the router's WAN MAC address. I found a [bug](https://dev.archive.openwrt.org/ticket/18488) describing this issue in OpenWRT's tracker. Rather than edit `/etc/config/network` like one of the comments suggested, I wrote an rc script that set the MAC address. ### `/etc/rc.d/99set_mac` ```sh #! /bin/sh /etc/rc.common START=99 MAC_ADDRESS=00:23:69:15:5C:81 MAC_IF=eth0.2 start() { ifconfig "$MAC_IF" down ifconfig "$MAC_IF" hw ether "$MAC_ADDRESS" ifconfig "$MAC_IF" up } ``` ### Reference - ["Override mac address doesn't work on wan"](https://dev.archive.openwrt.org/ticket/18488) ## Page metadata URL: Published 2021-07-16, updated 2022-12-30. Tags: - how-to - sysadmin - troubleshooting