Skip to content

Conversation

@ShujathMohd
Copy link

@ShujathMohd ShujathMohd commented Aug 25, 2025

This change removes the hardcoded eth0 network interface and adds support for either:

Passing a custom interface name via an environment variable (INTERFACE), or

Automatically detecting the first active non-loopback network interface if INTERFACE is not set.

Why this change?
On many modern Linux distributions (e.g., Arch/Manjaro), Ethernet interfaces are not named eth0 but instead follow a predictable naming scheme like enp0s31f6. The previous hardcoded approach caused the container to fail on those systems with errors like "Cannot find interface with name of 'eth0'".
This update ensures PPPwn works across all Linux distributions without manual changes.

What was changed:

Added INTERFACE as an environment variable (still defaults to eth0 if provided).

Updated start.sh to auto-detect the first active non-loopback interface when INTERFACE is not set.

Improved logging to show which interface is being used.

Maintains backward compatibility: users can still manually set INTERFACE with -e INTERFACE= when running the container.

How to test:

Run the container without INTERFACE set:

docker run --rm --net=host --privileged pppwn

It should auto-detect the active interface.

Run with a specific interface:

docker run --rm --net=host --privileged -e INTERFACE=enp0s31f6 pppwn

It should use the provided interface.

This makes the Docker setup much more portable and user-friendly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant