nym icon indicating copy to clipboard operation
nym copied to clipboard

Support different ipv6 network device in network-tunnel-manager.sh

Open heri16 opened this issue 1 month ago • 2 comments

On many VPS providers, the IPv4 uplink network interface is eth0, while the IPv6 uplink may be on a different interface (e.g., eth1 or another device).

This PR:

  • [x] Improves automatic detection of the uplink network interface for both IPv4 and IPv6.
  • [x] Adds support for configurations where the IPv4 and IPv6 uplinks are on different interfaces, while remaining fully compatible with setups where they share the same interface.
  • [ ] Changes the expect environment variable name from NETWORK_DEVICE to NET4_DEVICE and NET6_DEVICE

This change is Reviewable

heri16 avatar Nov 29 '25 18:11 heri16

@heri16 is attempting to deploy a commit to the nyx-network Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Nov 29 '25 18:11 vercel[bot]

Thank you for making this first PR

github-actions[bot] avatar Nov 29 '25 18:11 github-actions[bot]

Hey, it looks good. Thank you for your PR. You haven't ticked the env var but I see it added in the PR

Please redirect it from develop to feat/operators/ntm-upgrades.

This var is used here: https://github.com/nymtech/nym/blob/develop/scripts/nym-node-setup/nym-node-cli.py#L578 https://github.com/nymtech/nym/blob/develop/scripts/nym-node-setup/nym-node-cli.py#L643

If you want you can toggle that too, otherwise I will fix that one

serinko avatar Dec 02 '25 12:12 serinko

For the record: "ip -6 -o route show default" was not reliable. On my VPS machine (Debian 13), it requires "print $3" while the original script uses "print $5". See:

nonroot@localhost:~$ ip -6 -o route show default
default dev eth1.1 proto static metric 1024 pref medium

heri16 avatar Dec 02 '25 20:12 heri16

https://github.com/nymtech/nym/blob/develop/scripts/nym-node-setup/nym-node-cli.py#L643

Should we have:

  • Option A: --uplink-dev-v4 and --uplink-dev-v6
  • Option B: --uplink-dev and --uplink-dev-v6 where v6 defaults to autodetection if unspecified?

@serinko

Also, I've found another issue with the quic_bridge_deployment.sh on machines such as mine. Would you prefer a different PR? This line containing UPLINK_DEV is used by quic_bridge_deployment.sh: https://github.com/nymtech/nym/blob/develop/scripts/nym-node-setup/nym-node-cli.py#L577

heri16 avatar Dec 02 '25 20:12 heri16

:lgtm:

heri16 avatar Dec 02 '25 21:12 heri16

I would prefer this one as the program should ask minimum from the operator

* Option B: `--uplink-dev` and `--uplink-dev-v6` where v6 defaults to autodetection if unspecified?

If that issue on QUIC connects to this interface, feel free to add it to this PR.

serinko avatar Dec 03 '25 09:12 serinko

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs-nextra Ignored Ignored Preview Dec 3, 2025 9:14am

vercel[bot] avatar Dec 03 '25 09:12 vercel[bot]

Done. Please review and merge. @serinko @mfahampshire

heri16 avatar Dec 05 '25 21:12 heri16