Page MenuHomeDevCentral

ipv6enabler.sh to mirror udp4/tcp4 to udp6/tcp6 (suggested by PtitGNU)

Authored By
dereckson
Apr 16 2016, 21:06
Size
316 B
Referenced Files
None
Subscribers
None

ipv6enabler.sh to mirror udp4/tcp4 to udp6/tcp6 (suggested by PtitGNU)

#!/bin/sh
SOCAT=socat
TCPPORTS="9981 9982"
UDPPORTS="9777"
# TCP Ports
for PORT in $TCPPORTS; do
nohup ${SOCAT} TCP6-L:${PORT},fork,ipv6only=1,su=nobody TCP4:127.0.0.1:${PORT} &
done
# UDP Ports
for PORT in $UDPPORTS; do
nohup ${SOCAT} UDP6-L:${PORT},fork,ipv6only=1,su=nobody UDP4:127.0.0.1:${PORT} &
done

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27730
Default Alt Text
ipv6enabler.sh to mirror udp4/tcp4 to udp6/tcp6 (suggested by PtitGNU) (316 B)

Event Timeline