I want to create a device of some sort where I am absolutely positive that only UDP traffic can pass one way. Of course I could setup whatever old router I might have, the thing is I want to make it as small as possible and with as little power consumption as needed. What components could or should I use for such an application?
You need a device with two ethernet ports and filtering capability. Such as an advanced router. Or if you posses the ability to program it, a micro-controller with two Ethernet interfaces or two interface chips and a lot software work.
UDP is a principle that has to be filtered out by a level of package inspection at least, at any lower level it's just bits passing through.
A router "certified" for UDP package filtering (there are plenty, if you pay attention) is probably the more affordable ready-made option you have, where you only need to click a few check boxes.
If you want, that information can go from A to B, but impossible to flow information from B to A, the simplest solution is:
make a special ethernet cable, where only one pair (the one carrying information from A to B) is intact, but the other pair (that would normally carry information from B to A), just cut that pair away.
This way, it is physically impossible to transfer the information to the wrong direction.
And, it does at least something to block TCP and allow only UDP:
Since TCP uses a handshake to connect, that connecting needs a two-way information path. Because that does not exist with such a modified cable, that causes the TCP handshake to always fail.
So UDP can go only to one direction, but TCP can not even connect successfully.