Not able to access container connected to gluetun with macvlan network #738
Replies: 7 comments 9 replies
-
I have no idea! Although what's your ui on 8080? Are you sure you have something running on that port? If you do, then I don't know why it doesn't work. Maybe ask on Docker forums 🤔? |
Beta Was this translation helpful? Give feedback.
-
Only if i knew more about iptables may be i could figure it out. I have another openvpn image where i am using the same setup where this is working. However even for that image the following change https://github.com/dperson/openvpn-client/pull/317/files caused the same issue for me, so then i just built a custom image from an older commit. I will see if i can figure out whats up. |
Beta Was this translation helpful? Give feedback.
-
Some more info. Even with firewall off I see the same issue. I have confirmed there is a service running on the port as i did a curl call on that port from within the container and got data back. Now i need to debug why I cannot make that call from outside the container. |
Beta Was this translation helpful? Give feedback.
-
Also confirmed works fine with bridge network. So this issue is specific to macvlan.
|
Beta Was this translation helpful? Give feedback.
-
@arpitgupta did you ever find a solution to this? I'm running into the same issue! |
Beta Was this translation helpful? Give feedback.
-
Alright I have something working:
After running the above script you should have 2 networks (1 which goes through your normal gateway and 1 that goes through the (Gluetun) VPN client container. You can now run this dummy container to see if it works:
Now running this command will give you the outbound IP from the VPN tunnel:
I'm not sure if this is "safe" EDIT: Edited the post to the latest state i'm running. |
Beta Was this translation helpful? Give feedback.
-
I'm also trying to achieve a similar setup, I want to route all outgoing traffic through the VPN, while still allowing to access the local dashboards via a separate IP address through macvlan:
This is my container, I can see it has the ipv4 address assigned in portainer but it's not reachable. I can only reach it through gluetun's ip address. Does anyone know if it's possible to achieve what I need? |
Beta Was this translation helpful? Give feedback.
-
Running on Synology with macvlan nework with IP: 192.168.1.240. I have confirmed that the container using gluetun has the network setup and is connected to the vpn. However i am not able to access the UI. Is macvlan network supported? Or do i need to add custom ip table rules? Any pointers?
docker compose
service logs
ip tables info
ip route info
Beta Was this translation helpful? Give feedback.
All reactions