You need to figure both sides with netcat, one side should listen:
# ifconfig tun create
tun0
# nc -u -l --tun /dev/tun0 192.168.100.12 2600 &
# ifconfig tun0 inet 10.4.100.2/24 10.4.100.3 up
# ifconfig tun create
tun0
# nc -u --tun /dev/tun0 192.168.100.12 2600 &
# ifconfig tun0 inet 10.4.100.2/24 10.4.100.2 up
This is very naiive and probably quite fragile, but it is enough to enable tun
tests using just netcat.
Add usage and help strings
Add tun tunnelling test using nc