Created
October 16, 2017 09:52
-
-
Save eruffaldi/9da37832e1c1b019b49aef2894d54127 to your computer and use it in GitHub Desktop.
SSH UDP Tunnelling: remote to local UDP server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only for remote UDP https://stackpointer.io/network/ssh-port-forwarding-tcp-udp/365/ | |
# Local UDP server to Remote UDP server | |
ssh -L 9999:127.0.0.1:9999 percro@alientelecom socat tcp4-listen:9999,reuseaddr,fork udp:target:9999 | |
socat -T15 udp4-recvfrom:9999,reuseaddr,fork tcp:localhost:9999 | |
# Remote UDP server to Local UDP server | |
ssh -R 9999:127.0.0.1:9999 percro@alientelecom socat udp4-recvfrom:9999,reuseaddr,fork tcp:localhost:9999 | |
socat -T15 tcp4-listen:9999,reuseaddr,fork udp:localhost:9999 | |
# Test from Remote | |
nc -u 127.0.0.1 9999 | |
# Test from Client | |
nc -ul 127.0.0.1 9999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment