abiosoft / abiosoft/colima

Host resolution issue with Vpn

Đang mở
#917 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
30.8k
Fork
613
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Description

I was facing issues fetching images from organisation registry on VPN, I did a little dig up and figured out somewhat what may be the cause of the issue.

https://github.com/lima-vm/lima/pull/1626

As per this MR, the hostResolver should be false for user-v2 network driver.

However from this line:
https://github.com/abiosoft/colima/blob/af03f48882bfb2ae09eb84dc7167db339d88393b/environment/vm/lima/yaml.go#L77

this will only be false if `network.dnsHost` will have at least one entry.

By default there is no entry and hence this was not working, while I was able to do nslookup, I was not able to make connections with the server.

So I tried to add a dummy entry like:
```
network:
dnsHosts:
host.docker.internal: host.lima.internal
```

and the resolution started working fine. Sorry I am able to not provide much details of what I did here, since I just hacked my way out 😄 but I think this should be fixed and made default behaviors and would close most of the VPN related issues.

### Version

colima version 0.6.6
git commit: 9ed7f4337861931b4d0192ca5409683a4b7d1cdc

runtime: docker
arch: aarch64
client: v24.0.7
server: v24.0.7

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [X] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.107.2
INFO[0000] socket: unix:///Users/anurag.ag/.colima/default/docker.sock

### Reproduction Steps

1. Use openvpn to connect to your organisation vpn on your host machine
2. Try to do curl on any of the internal company url inside the machine and it should not work
3. Add dummy host mapping in the colima.yaml, restart the machine and try again and this time it should work

### Expected behaviour

VM should have VPN accessible even without needing the dummy host entry

### Additional context

_No response_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

The issue points to environment/vm/lima/yaml.go line 77 where hostResolver is set based on network.dnsHost entries. Examine the Lima integration and network configuration to understand how host resolution works with VPN. Test by modifying the default configuration to set hostResolver appropriately without requiring dummy entries, and verify connectivity inside the VM.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, go
Lĩnh vực
cli, networking
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.