To disable or enable ipv6 on a Linux machine:
Enable
echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
Disable
echo 1 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
This is useful if you are using an ipv6 broker and the tunnel is going up and down or the latency too high for particular websites and you want to temporarily disable ipv6 and re-enable it later.