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

How to allow containers access to LAN #296

Open
mavhc opened this issue Apr 17, 2022 · 2 comments
Open

How to allow containers access to LAN #296

mavhc opened this issue Apr 17, 2022 · 2 comments

Comments

@mavhc
Copy link

mavhc commented Apr 17, 2022

Is there a way to allow containers to access the LAN that the host is on?

I've tried with specified bridge networks:

# wget http://192.168.0.1
Connecting to 192.168.0.1 (192.168.0.1:80)
wget: can't connect to remote host (192.168.0.1): Connection refused
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.112.1   0.0.0.0         UG    0      0        0 eth0
192.168.112.0   *               255.255.240.0   U     0      0        0 eth0

And with ipvlan network:

# wget http://192.168.0.1
Connecting to 192.168.0.1 (192.168.0.1:80)
# wget: can't connect to remote host (192.168.0.1): Host is unreachable
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.77.60.1      0.0.0.0         UG    0      0        0 eth0
10.77.60.0      *               255.255.255.0   U     0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
192.168.112.0   *               255.255.240.0   U     0      0        0 eth2
@AkihiroSuda
Copy link
Member

Sorry, I don’t get the context.

@mavhc
Copy link
Author

mavhc commented May 4, 2022

Sorry, running rootless docker, from within a container, should I be able to access computers on the same network as the host machine? I can from a docker container running as root.

Access to computers on the internet is working fine, as is access to other containers on the same docker 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

2 participants