Skip to content

Access host machine running web service from container on Arch linux #25120

Answered by eriksjolund
wonderplayer asked this question in Q&A
Discussion options

You must be logged in to vote

I have launched a simple web service on http://localhost:5042

Connecting to the host's localhost is not allowed by default.

You could use one of the pasta options --map-gw, --map-host-loopback or --tcp-ns (-T).

I wrote some examples of how to use rootless Podman with the pasta network driver to connect to the host:

Outbound TCP/UDP connections to the host's localhost

Outbound TCP/UDP connections to the host's main network interface (e.g eth0)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wonderplayer
Comment options

Answer selected by wonderplayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants