abiosoft / abiosoft/colima

Host resolution issue with Vpn

オープン
#917 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
30.8k
フォーク
613
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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_

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, go
領域
cli, networking
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。