Skip to content

Instantly share code, notes, and snippets.

@nuxlli
Created June 10, 2015 00:53
Show Gist options
  • Select an option

  • Save nuxlli/e48d79be876301c84285 to your computer and use it in GitHub Desktop.

Select an option

Save nuxlli/e48d79be876301c84285 to your computer and use it in GitHub Desktop.
Export azk balancer to a public interface
# No mac ou linux
sudo ncat --sh-exec "ncat dev.azk.io 80" -l 80 --keep-open
# Apenas no linux
(
public_interface="eth0";
docker_ip=`ip -o -4 add show docker0 | awk '{print $4}' | cut -d/ -f1`;
echo iptables -t nat -A PREROUTING -i ${public_interface} -p tcp -m tcp \
--dport 80 -j DNAT --to-destination ${docker_ip}:11000;
)
# Add to Azkfile.js in http.domains
# "#{system.name}.[public_interface_ip].xip.io"
# ex: "#{system.name}.10.225.35.102.xip.io"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment