Page MenuHomeDevCentral

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

Authored by dereckson on Jun 1 2015, 00:19.
#!/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

Event Timeline

dereckson changed the title of this paste from untitled to w | ipv6enabler.sh to mirror udp4/tcp4 to udp6/tcp6.
dereckson updated the paste's language from autodetect to autodetect.
dereckson changed the title of this paste from w | ipv6enabler.sh to mirror udp4/tcp4 to udp6/tcp6 to ipv6enabler.sh to mirror udp4/tcp4 to udp6/tcp6 (suggested by PtitGNU).
dereckson updated the paste's language from autodetect to bash.

To use for T420, 127.0.0.1 should be replaced by the lxc mailserver container IP.