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

NAT configuration #939

Closed
thedarkknight197 opened this issue Nov 17, 2021 · 3 comments
Closed

NAT configuration #939

thedarkknight197 opened this issue Nov 17, 2021 · 3 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@thedarkknight197
Copy link

thedarkknight197 commented Nov 17, 2021

Hello I have an ec2 on AWS, I have created an IPFS server private because I need a private ipfs node.
If I connect to my aws shell and use curl to add a new file with
curl -X POST 127.0.0.1:5001/api/v0/add -F "file=@text.txt"

it work, but if I do the same from my client don't.
I recive this message: curl: (7) Failed to connect to XX.XXX.XXX.XXX port 5001: Connection refused
I have open the 5001 port on firewall also on AWS. What I need to do?

@thedarkknight197 thedarkknight197 added the need/triage Needs initial labeling and prioritization label Nov 17, 2021
@aschmahmann
Copy link
Contributor

aschmahmann commented Nov 17, 2021

@thedarkknight197 questions like this are best asked on discuss.ipfs.io so that they can be more easily discovered (closed GitHub issues aren't great for that).

Here's a brief explanation, but if you have more questions feel free to ask there:

Your API port is exposed in your config file as /ip4/127.0.0.1/tcp/5001 (https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addressesapi) which means that it's only listening on the local interface not whatever is exposed to the world. If you'd like you can change that to 0.0.0.0 or something else.

However, doing so will mean that anyone in the world would be able to control your node unless you add some level of protections in front (also given that you're just using HTTP and not HTTPS the data will also not be encrypted as it's sent over the wire between your machine and AWS). So definitely beware before doing this.

@thedarkknight197
Copy link
Author

thedarkknight197 commented Nov 17, 2021

@thedarkknight197 questions like this are best asked on discuss.ipfs.io so that they can be more easily discovered (closed GitHub issues aren't great for that).

Here's a brief explanation, but if you have more questions feel free to ask there:

Your API port is exposed in your config file as /ip4/127.0.0.1/tcp/5001 (https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addressesapi) which means that it's only listening on the local interface not whatever is exposed to the world. If you'd like you can change that to 0.0.0.0 or something else.

However, doing so will mean that anyone in the world would be able to control your node unless you add some level of protections in front (also given that you're just using HTTP and not HTTPS the data will also not be encrypted as it's sent over the wire between your machine and AWS). So definitely beware before doing this.

Thank you or your answer, I will try with 0.0.0.0, it's not a problem because I will have a nodejs middleware that allow access and write data for only user authorized

@thedarkknight197
Copy link
Author

thedarkknight197 commented Nov 17, 2021

I open here: https://discuss.ipfs.io/t/help-aws-ipfs-connection-refused/12693
This could be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants