sudo socat TCP4-LISTEN:12345,fork TCP4:192.168.1.2:56789
Or with UDP port:
sudo socat UDP-LISTEN:161,fork UDP:10.72.211.141:161
sudo socat TCP4-LISTEN:12345,fork TCP4:192.168.1.2:56789
Or with UDP port:
sudo socat UDP-LISTEN:161,fork UDP:10.72.211.141:161