Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Broken - Tries To Use IPFS gateway at 0.0.0.0:8080 #1821

Closed
c0llab0rat0r opened this issue Apr 23, 2021 · 7 comments · Fixed by #2287
Closed

Download Broken - Tries To Use IPFS gateway at 0.0.0.0:8080 #1821

c0llab0rat0r opened this issue Apr 23, 2021 · 7 comments · Fixed by #2287
Labels
area/screen/files Issues related to Files screen exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now released status/needs-repro Indicates that an issue needs to be reproduced and clear problem defined before proceeding

Comments

@c0llab0rat0r
Copy link

Version information:

go-ipfs version: 0.8.0-ce693d7
Repo version: 11
System version: amd64/linux
Golang version: go1.14.4

The above is from a container running docker tag ipfs/go-ipfs:v0.8.0, running on Ubuntu 20.04 LTS.

Description:

Browse to the admin web site (yourserver:5001), click on Files, click on the elipsis, and click Download. The download will fail.

If you use F12 in FireFox to open the networking tab and try again, you'll see a GET failure to 0.0.0.0:8080. Presumably, the web site is assuming that the IP address the gateway HTTP server is bound on is also an IP address it can use from the browser.

Since the IPFS gateway is running in a Docker container, it binds to 0.0.0.0, and does not know what the external IP address of its own IPFS gateway is. This would also apply if the IPFS gateway is behind a reverse proxy or NAT.

Suggested changes

  • The web site should detect obvious incorrect information for the gateway (e.g. when it is 0.0.0.0) and alert the user. The web site already does this for detection of incorrect CORS configuration
  • There should be an additional setting to specify the public address of its own gateway. If this setting already exists, the alert should describe how to configure it or refer the user to documentation on how to do it

A harsher option could be to require the new field to be populated when the gateway is bound to 0.0.0.0, but that wouldn't be backward compatible.

@lidel
Copy link
Member

lidel commented Jul 19, 2021

Thank you for reporting this – it is a bug in ipfs-webui – moving to the correct repo.

It reads Gateway address from go-ipfs config but does not seem to validate if it is reachable.
The fix here is to test if local gateway can be used by making a request similar to one in ebda764.

If someone wants to pick this up, this might be tackled together with #1814 (comment)

@lidel lidel transferred this issue from ipfs/kubo Jul 19, 2021
@ipfs ipfs deleted a comment from welcome bot Jul 19, 2021
@ipfs ipfs deleted a comment from welcome bot Jul 19, 2021
@lidel lidel added area/screen/files Issues related to Files screen exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now labels Jul 19, 2021
@lidel lidel removed their assignment Jul 19, 2021
@SgtPooki SgtPooki moved this to To do in IPFS-GUI (PL EngRes) Jul 19, 2022
@SgtPooki SgtPooki added the status/needs-repro Indicates that an issue needs to be reproduced and clear problem defined before proceeding label Dec 5, 2022
@SgtPooki SgtPooki moved this from Needs Grooming to Needs Prep Work / Blocked in IPFS-GUI (PL EngRes) Dec 5, 2022
@SgtPooki
Copy link
Member

SgtPooki commented Dec 5, 2022

We need to reproduce this and make sure we have documented the steps for doing so. We will then probably need to clarify what sort of messaging to provide to users (prompt them to update gateway configured in settings?) given an invalid gateway URL from go-ifps

@hadim
Copy link

hadim commented Mar 9, 2023

I would also be interested in that feature since it will allow browsing and using a deployed ipfs container on a local network. For now the webui works fine but all the download fail.

@F-Node-Karlsruhe
Copy link

Using kubo in docker and there the gateway is 0.0.0.0 which is of course not reachable from the outside, but changing the gateway to the domain crashes kubo.

Can we make the gateway configurable in the frontend?

@wblondel
Copy link

I have the same issue, is there any workaround?

@lidel
Copy link
Member

lidel commented Oct 31, 2024

@wblondel workaround is updating configuration in Addresses.Gateway to have /ip4/127.0.0.1/tcp/8080 instead of /ip4/0.0.0.0/tcp/8080 and probably also to run docker with --net=host (NAT is not necessary, and only cripples your node's connectivity options).

Once fix from #2287 lands, this will no longer be necessary.

SgtPooki added a commit that referenced this issue Nov 7, 2024
ipfs-gui-bot pushed a commit that referenced this issue Nov 7, 2024
## [4.4.0](v4.3.3...v4.4.0) (2024-11-07)

 CID `bafybeibkirkltohusogcco46jcw7khtgjf5nwphuvufjssr5pvhsuol5uy`

 ---

### Features

* use [email protected] ([#2283](#2283)) ([437b8fe](437b8fe)), closes [#2259](#2259)

### Bug Fixes

* normalize catch-all listeners to loopback ([#2287](#2287)) ([edf14c6](edf14c6)), closes [#1821](#1821)
* remove iltorb dep, build for node v22.9.0 ([#2273](#2273)) ([9ba4559](9ba4559))

### Trivial Changes

* move enum.js to lib folder ([#2285](#2285)) ([682de0b](682de0b))
* pull new translations ([#2279](#2279)) ([8205d12](8205d12))
@ipfs-gui-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/screen/files Issues related to Files screen exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now released status/needs-repro Indicates that an issue needs to be reproduced and clear problem defined before proceeding
Projects
No open projects
Status: Needs Prep Work / Blocked
Development

Successfully merging a pull request may close this issue.

7 participants