Skip to content

Port forwarding does not work when the bridged interface is not the first one on a device (MacOS, Windows) #230

@tcaiazzi

Description

@tcaiazzi

The current implementation of port forwarding in Kathará encounters an issue when the bridged interface is not the first one on a device. This error is related to a Docker Desktop issue (docker/for-mac#6978) that affects port forwarding functionality.

To address this issue, while waiting for an official Docker fix, we propose a possible workaround that involves starting the device with only the bridged interface initially and then dynamically connecting other interfaces using the vconfig/lconfig command.

In the following you can find a quick example, which starts a device with the apache2 service exposed on port 8080 of the host:

kathara vstart -n pc1 --bridged --port 8080:80 --image kathara/base --exec "/etc/init.d/apache2 start"

Now, you can attach a new interface using the vconfig command:

 kathara vconfig -n pc1 --add A

In this way, the port forwarding works and you can attach other interfaces to the device.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions