Proxy configuration works but internet only working on host not in containers


#1

So I have a NUC device (although not sure it matters) - installed with a proxy using redsocks that seems to work well. Device is registered etc… If I open a console on the “Host OS” and do the following it works as I’d expect. If I do the same thing from one of the containers it does not.

$ cd /tmp
$ wget google.com

The same application running in an environment without a proxy works flawlessly both on the host and in the containers.

I’m guessing this is an iptables configuration/forwarding issue? Ideas/hints?


#4

Hi, Do you have an example of some minimal reproduction code so that I can replicate your problem?


#5

@lucianbuzzo the getting started project for multicontainer does this for me - https://github.com/resin-io-projects/multicontainer-getting-started

Just shell into data & host os.


#45

We are trying to first reproduce this and test a possible fix but at the moment we can’t reproduce it


#49

Hi @arfoll,

We have a test build that should fix the issue you are reporting. Would you be able to give it a try?

Regards,
Andrei


#50

We have a test build that should fix the issue you are reporting. Would you be able to give it a try?

Regards,
Andrei


#51

Yes - no problem.


#52

Great @arfoll. Here you can download the test image for a RaspberryPi3. It is based on this github pull request. Be aware that the image will have no resinio configuration. So, in order to test it, you will need to download from the dashboard a configuration (see New feature: download configuration only) and inject it (copy it) in the root of the first partition (resin-boot) as a filename called config.json.

Thanks,
Andrei


#54

I forgot to mention something. In our documentation we have a redsocks configuration example. Make sure you replace local_ip = 127.0.0.1; by local_ip = 0.0.0.0;. See the commit log in the PR referenced above for more details.


#55

uhm that looks complicated… I’ll have a go on monday when back in office.

I had also already tried changing local_ip to accept all connections, I initially thought that would be the issue.


#57

It is a combination of that and iptables rules.