I know it is trivial to spoof your IP address with UDP: simply change the value of the source address in the IP header and the recipient has no idea where the packet actually came from.
My question is whether I can put a local value in this header field (e.g. 192.168.1.1 or even 127.0.0.1) and still expect the packet to arrive over the Internet. Do routers (either from your ISP, other Internet routers, or the recipient's routers) filter it out?
Any router that routes from/to WAN should filter out any packets with local addresses, but the question is whether that actually commonly happens. For example I'd also expect ISPs to filter out source addresses that aren't in a range they own (e.g. they own 1.1.1.1/24 so then packets that seemingly originate from 1.2.1.1 should never leave the network), but nobody seems to implement that.