For a project I am working on I needed to rewrite a DGram port. I moved the ports around and found a few quick tests.
Testing with NC
my-machine:~$ echo -n “data-message” | nc -v -4u -w1 localhost 88 found 0 associations found 1 connections: 1: flags=82<CONNECTED,PREFERRED> outif (null) src 127.0.0.1 port 53862 dst 127.0.0.1 port 88 rank info not available Connection to localhost port 88 [udp/radan-http] succeeded!
Rewriting incoming datagrams to another port
You can run the sample, and get the results as follows
server listening 0.0.0.0:88 server got: j��0����