abiosoft / abiosoft/colima

Unable to connect to hosts through VPN interface from colima VM

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

説明

### Description

Initially when creating a colima VM, I can do something like `colima ssh` and then `curl -v internal.corporate-domain.com` and successfully connect and get back a response.

But at a later time, sometimes weeks/months later, all networking breaks between the VM (and any docker containers running on the VM) and the internal corporate network. Restarting the computer and/or the colima VM does not resolve the issue. The only resolution is to tear down the colima VM and create a new one.

The VPN on the mac creates an interface like this: `inet 172.19.21.19 --> 172.19.21.19 netmask 0xffffffff`
There is also a physical network interface on the mac: `inet 192.168.86.42 netmask 0xffffff00 broadcast 192.168.86.255`

Here is some debugging output from the colima VM:

## successful nslookup

```bash
colima:/Users/ccasola$ nslookup xxx-staging.xxx.com
Server: 192.168.107.1
Address: 192.168.107.1:53

Non-authoritative answer:
Can't find xxx-staging.xxx.com: No answer

Non-authoritative answer:
Name: xxx-staging.xxx.com
Address: 172.21.132.52
```

## curl fails to connect

```bash
colima:/Users/ccasola$ curl -v http://xxx-staging.xxx.com/
* Trying 172.21.132.52:80...
* connect to 172.21.132.52 port 80 failed: Host is unreachable
* Failed to connect to xxx-staging.xxx.com port 80 after 3097 ms: Host is unreachable
* Closing connection 0
curl: (7) Failed to connect to xxx-staging.xxx.com port 80 after 3097 ms: Host is unreachable
```

## ifconfig on colima vm

output

```bash
colima:/Users/ccasola$ ifconfig
br-861424ecd59b Link encap:Ethernet HWaddr 02:42:52:40:74:7C
inet addr:172.20.0.1 Bcast:172.20.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

br-aa39713c361f Link encap:Ethernet HWaddr 02:42:68:34:DE:D0
inet addr:172.21.0.1 Bcast:172.21.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

br-cf68d4a5c6cf Link encap:Ethernet HWaddr 02:42:1A:D5:88:4E
inet addr:172.18.0.1 Bcast:172.18.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

docker0 Link encap:Ethernet HWaddr 02:42:93:3F:AD:47
inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 52:55:55:83:2B:8F
inet addr:192.168.5.15 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::5055:55ff:fe83:2b8f/64 Scope:Link
inet6 addr: fec0::5055:55ff:fe83:2b8f/64 Scope:Site
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:405 errors:0 dropped:0 overruns:0 frame:0
TX packets:354 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41947 (40.9 KiB) TX bytes:43449 (42.4 KiB)

eth1 Link encap:Ethernet HWaddr 5A:94:EF:B8:ED:B2
inet addr:192.168.107.2 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::5894:efff:feb8:edb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1668 (1.6 KiB) TX bytes:2434 (2.3 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:792 (792.0 B) TX bytes:792 (792.0 B)
```

### Version

Colima Version:

```
colima version 0.4.4
git commit: 8bb1101a861a8b6d2ef6e16aca97a835f65c4f8f

runtime: docker
arch: aarch64
client: v20.10.17
server: v20.10.11
```

Lima Version:

```
limactl version 0.11.3
```

Qemu Version:

```
qemu-img version 7.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
```

### Operating System

- [ ] macOS Intel
- [X] macOS M1
- [ ] Linux

### Reproduction Steps

1. colima start
2. colima ssh
3. curl -v corporate-app.corporation.com

### Expected behaviour

curl should be able to connect to the host.

### Additional context

This is not isolated to a single person, multiple people have been experiencing this at our company. Thanks in advance for any help you can provide!

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

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

評価

この issue はまだ評価されていません。

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

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