Created
June 10, 2015 00:53
-
-
Save nuxlli/e48d79be876301c84285 to your computer and use it in GitHub Desktop.
Export azk balancer to a public interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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