ziti-tunneler-client.v1 is "old". Use intercept.v1, it's the 'newer' version of ziti-tunneler-client.v1
However, what's helpful, is if you say "this is what I wanted to do, this is how I did it, and this is what I'm observing."
Also - I really would ask you to not use "ziti edge create terminator". I really urge you to use the identities in the edge-routers/tunnelers instead.
Can you explain, what are you trying to do and how you started docker? I assume you are running httpbin as a docker container. Posting the docker-compose file helps too because then I can see what's happening better. I expect you did not add the httpbin to a network? But maybe you did.
And finally, sometimes it's easie to push all your stuff into a github repo, or somewhere else online where I can see all these files/scripts.
Create terminator is there but it's not well-documented and it'll just be harder to accomplish whatever you're trying to do. Wherever you found that example, I'd probably like to update the sample to use an identity instead.
If you want to use this example though - you can tail the logs from the tunneler, and the logs from the router. Somewhere in there will be a hint as to what is going wrong. One other thing you can do is make sure your intercept works by issuing a dig (if on mac/linux) or a powershell “dns-resolvename” (if on windows) to see if “httpbin.ziti” is returned.
so you can try a dig @100.64.0.3 httpbin.ziti (assuming your name server is on 100.64.0.3) to verify it’s in the tunneler. you could also try running ziti edge policy-advisor identities|services to make sure there’s nothing else strange going on.
The ultimate goal is to run the Python samples on the server… I can run this locally… but experienced lots of issues when seeking to use a Docker container.
What I want to do
To run the following Python SDK example on the server running the Docker container.. as opposed to a local desktop
python h-ziti-p.py
While I can run this example locally, I want to know how to deploy it to a server environment.. and troubleshoot problems so that I can help with resolving technical issues.
this is why I am sticking with this to learn what I am missing. There is something fundamental I have not understood yet
This is how I did it
You will find the yaml file and commands in the folder below
This is what I’m observing
1 Replacing ziti-tunneler-client.v1 with intercept.v1 did not change anything
I took the ziti-tunneler-client.v1 reference from the Java Postgres example.. maybe it was an old version
2 dig @110.0.0.157 httpbin.ziti timed out
; <<>> DiG 9.11.36-RedHat-9.11.36-3.el8 <<>> @110.0.0.157 httpbin.ziti
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
So.. I am thinking.. maybe I need to run this within a container in Docker.. rather than just from the command line.. but I am not sure why not.. as I have the tunneller running and listening
Processes (like web servers) that just need to bind on a port below 1024 do not need to run as root: they can just be granted the net_bind_service capability instead.
Not sure if this has been granted… but probably could be the cause
httpbin will not be available OUTSIDE of the docker environment. It is binding only to the zitiblue and zitired networks.
If you remove the # on the ports option, then it will create a port forward from the host, to that service, so if I had a setting of
ports:
- 8080:80
Then if I connect to the host port 8080, it will translate the connection through to port 80 of the container, ie http://serverIP:8080. This will then work for machines that are off the host itself as this is a host binding.
Correct - httpbin is only resolvable to the applications running within the docker-compose environment and not to all systems.
You are asking the client to listen for (intercept) httpbin.ziti on port 2000 which you are sending through the overlay network to an edge-router, and the edge router will then be looking for httpbin. Since httpbin is resolvable by the edge router (it is on the same docker network) it should get there.
Because you enabled 8080 port bindings, then localhost:8080 will work, because that container is listenting on 8080 on the host, so either 127.0.0.1:8080 OR the host IP address:8080 will work.
SO, you just need to make sure that the edge-router that you are binding too needs to be able to resolve httpbin. The client is not concerned about httpbin and does not care about it. It only needs to know to listen for httpbin.ziti and then direct it through the overlay network.
To connect it over the ziti network, the client should be quering http://httpbin.ziti:2000 as that is what you are defining:
@markamind I have used your docker-compose file but hashed out the postgresSQL config as that is not relevant. These are the commands that I used to get the service up and going for me. You have used some slightly different configs which I have not yet come across, but I am a little behind your learnings!
Anyway - give this a go and see what happens.
I created an identity to be used, so this is what is referenced:
ziti edge create identity user http-client -a 'http-clients' -o http.client.jwt