Skip to content

Instantly share code, notes, and snippets.

@mikolajb
Created September 30, 2010 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikolajb/604294 to your computer and use it in GitHub Desktop.
Save mikolajb/604294 to your computer and use it in GitHub Desktop.
#!/bin/bash
# creates ssh tunnel
ssh -N -f -L 5353:localhost:5353 remote-host
# makes udp -> tcp stream
socat UDP-RECVFROM:53,fork TCP:localhost:5353
#!/bin/bash
# makes tcp -> udp stream
# (8.8.8.8 is a google public dns: http://code.google.com/speed/public-dns/)
socat TCP-LISTEN:5353,reuseaddr,fork UDP:8.8.8.8:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment