what if any collateral damage could I do to anyone coming from anywhere other than . ?
There shouldn't be any. A normal, correct IP is in the form
^\d+\.\d+\.\d+\.\d+$
(numerals, dot, numerals, dot, numerals, dot, numerals)
or technically
\d{1,3} et cetera
but let's not borrow trouble and we're making a rule to lock out the ones that don't match. Since we're not sure what form is actually reaching the server, the rule is best expressed as a negative: "the IP is
not in this acceptable form". This will only affect the unwanted visitors.
That's assuming you've got malign robots intentionally not sending an IP header. (Is this even possible?) If it's honest humans whose ISP and/or browser is acting up, then yes, there can be collateral damage. That's why it is important to have a friendly 403 page.
:: detour to test site because I'm making this up as I go along ::
Drat. mod_setenvif doesn't seem to recognize ! in patterns, so that leaves mod_rewrite:
RewriteCond %{REMOTE_ADDR} !^\d+\.\d+\.\d+\.\d+$
RewriteRule .? - [F]
As with any RewriteRule leading to the [F] lockout,
make sure there is an exemption for your custom 403 page. Otherwise the server goes into an infinite loop resulting in a behind-the-scenes 500 error.
:: now waiting for punchline to reveal that the host's logging rule forgot to update itself for IPv6 requests, and that's what is happening here ::