I have connected my OpenWrt one router behind my ISP router, which is operating in bridge mode. Every time I restart the ISP router (bridge), there is a moment when my OpenWrt WAN interface receives a private IP address. About 30 seconds later, I receive a second DHCP offer with the public IP address.
How should I handle this situation? Is there a way to block all traffic when the WAN IP is private or to reject the private IP assignment altogether?
This is normal for some ISP modems. When first started, they issue a private IP with a very short lease so you can log in and check its status in case the modem is unable to link upstream. The eventual public IP is handled by a server at the ISP end of the link, so it is not possible for that assignment to happen while the connection to outside the house is broken. It should be harmless to just let it do that. You could add a firewall rule to block traffic with a destination IP in the range that the modem is known to assign.
Normally you can simply ignore this behavior, as it is both transient and benign.
Theoretically, when you are assigned that private IP, no traffic will flow out the wan anyway since it likely doesn't have an actual route to the internet.
Your wan is firewalled, so no unsolicited traffic can ingress anway.
Are you experiencing any specific issues (aside from the observable IP address 'hickup' and the brief lack of connectivity)?
Thank you all for your helpful answers! @psherman No there are no issues, I just really wanted to ensure that I don't allow traffic with a private IP into the WAN.