UDP packet spoofed LAN source address?

Nerius Landys nlandys at gmail.com
Sun Oct 17 05:27:53 UTC 2010

This is really more of a networking question.
I'm wondering, in a typical scenario, for example my server is in a data
center with a typical colocation company.

I am editing someone else's code, and this code handles incoming UDP
packets.  The code handles UDP packets that have a source address being from
the LAN differently.  It gives those packets special treatment.  To check
whether a source address is a LAN address, it does the typical checks for,,,, and it also checks every
assinged IP address with netmask to see if the source address on the UDP
packet came from that network.

My question is - how possible (in these typical environments) is it to send
a UDP packet from far away that claims to have a source address being a LAN
address?  Will such a packet typically make it to my server, or will a
router along the way stop it from arriving?

Maybe, is there a simple 10 line C program that I can run and compile to
check if this scenario is possible on _my_ server?

- Nerius

More information about the freebsd-questions mailing list