Closed Folaht closed 2 years ago
I have no idea what "safe network" is expecting but have you tried if this works as root? The rootlesskit port forwarder which is used by default will change the source ip of the incoming connections, you can change this behaviour with with --network slirp4netns:port_handler=slirp4netns
I have not tried it as root yet. I'm trying it right now.
Adding --network slirp4netns:port_handler=slirp4netns
gives me:
Error: error from slirp4netns while setting up port redirection: map[desc:bad request: add_hostfwd: slirp_add_hostfwd failed]
Error: can only create exec sessions on running containers: container state improper
[update]
Rootfull seems to work.
map[desc:bad request: add_hostfwd: slirp_add_hostfwd failed]
This error usually means that the port is already binded IRC, can you check that?
What do you mean by binded and how to check that?
Do you mean to say it's already in use?
And which IP/port would have to be checked?
Something else on the host may be using the port in question. Are you sure the port is open?
The ports I assign them to are.
The random ports that show up are not.
And this doesn't happen under rootfull containers.
A friendly reminder that this issue had no activity for 30 days.
Could you verify if you still have this issue with podman 4?
I close this since this is a configuration problem and nothing podman can really fix. We can continue the discussion here.
I still have this issue with podman 4.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Make podman + slirp4netns work with the safe network. I'm not sure if this is a maidsafe issue or a podman issue, so I'm putting this in both.
Description
My goal is to put safe network nodes to work inside rootless podman containers,
as an attempt to ensure that all safe network nodes run on the same safe environment on all machines, without any interference from any other application.
This result so far of my attempt is that I can run the root node inside the container with LAN and tap0 IP addresses, but the root podman container node unfortunately assigns the wrong IP address and port the for host node when it attempts to connect to the root node via slirp4netns. Or the host node does it itself. I don't know what goes on internally.
Steps to reproduce the issue:
podman pull ghcr.io/safenetwork-community/rootnode-ipv4:main-dev
curl -so- https://raw.githubusercontent.com/maidsafe/sn_cli/master/resources/install.sh | bash
safe install node
cp /home/user/.local/share/safe/cli/networks/lan-ipv4_node_connection_info.config /home/user/.safe/cli/networks/lan-ipv4_node_connection_info.config
Describe the results you received:
https://gist.github.com/Folaht/70ae0329b5acd176cc3ea84b920c1576
Describe the results you expected:
I was hoping I would have a connection between these two nodes.