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

Can't access any external network resources #9

Open
ishankhare07 opened this issue Dec 31, 2019 · 3 comments
Open

Can't access any external network resources #9

ishankhare07 opened this issue Dec 31, 2019 · 3 comments

Comments

@ishankhare07
Copy link

Hi,
I'm following the source code and the thing i noticed was, I wasn't able to access and external network endpoints. All commands like ping, wget etc. failed from inside the child process.
Initially I thought this is because I haven't passed the CLONE_NEWNET namespace, but I don't think that should be the case. I tried adding it anyway but it didn't help.

@viniciusbds
Copy link

viniciusbds commented May 10, 2020

Hi @ishankhare07, did you solve the network problem?

I was facing this error too, I solved the problem by creating the /run/systemd/resolve/stub-resolv.conf file inside rootfs

as content of this file, I inserted "nameserver 8.8.8.8"

ps: i'm using the ubuntu as rootfs http://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64-root.tar.xz

@ishankhare07
Copy link
Author

@viniciusbds i'll give this a try. Is it because there's no DNS resolver?
I mean is that the only problem? Because if that's the case, I should be able to query a website by its IP without any issue.

@aahemm
Copy link

aahemm commented Jun 6, 2022

Hi @ishankhare07,
When you create a new network namespace you create a completely new networking stack that has nothing in it except one loopback interface that is DOWN. You need to do some amount of extra work to setup the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants