configuration/local/bin/0ad-sockets

7 lines
296 B
Plaintext
Raw Normal View History

2020-03-20 17:35:12 +01:00
#!/bin/sh
st -e socat tcp-listen:6667,reuseaddr,fork udp:localhost:20595 &
st -e ssh -R 6667:localhost:6667 Hetzner "grep -q '^AllowTcpForwarding yes$' /etc/ssh/sshd_config && grep -q '^GatewayPorts yes$' /etc/ssh/sshd_config && socat udp-listen:20595,reuseaddr,fork tcp:localhost:6667" &
wait