this post was submitted on 05 Oct 2024
26 points (100.0% liked)

Linux

47568 readers
811 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I was setting up my laptop for traveling and adding Wireguard VPN configuration.

The Wireguard config generated by router only contains IPv4 address (10.0.5.x), and while testing the VPN to my surprise "what is my ip" websites can find my IPv6 address (I USB tethered mobile connection to my laptop).

It looks like NetworkManager does nothing about IPv6 connection if VPN doesn't have IPv6 settings, which is bad for road warrior type of VPN configuration.

Is there an easy toggle to turn of IPv6 if VPN is connected and otherwise? Or is only option to disable all IPv6 no matter what?

all 8 comments
sorted by: hot top controversial new old
[–] Supermariofan67@programming.dev 2 points 9 hours ago

Best to set a firewall rule with nftables to block non-vpn traffic from leaving (you should also do the save for IPv4 traffic to prevent leaks in case the tunnel disconnects)

[–] axzxc1236@lemm.ee 2 points 12 hours ago (1 children)

I tried the same setup with Ubuntu 24.04.1 desktop live system and I can replicate this IP leak issue, I guess I will have to disable IPv6.

[–] sunzu2@thebrainbin.org 1 points 6 hours ago (1 children)

Disable in network manager?

[–] axzxc1236@lemm.ee 2 points 3 hours ago

That is what I was thinking, yes.

[–] LainTrain@lemmy.dbzer0.com -1 points 11 hours ago* (last edited 11 hours ago) (2 children)

I'd also like to know, is there a way to just turn off this ipv6 trashfire? Preferably in a universal, cross-distro way?

Seems like the most universal way is: GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"

[–] Supermariofan67@programming.dev 2 points 9 hours ago (1 children)

Or you could just... learn to use the modern internet that 60% of internet traffic uses? Not everyone has a dedicated IPv4 anymore, we are in the days of mobile networks and CGNAT. IPv4 exhaustion is here today.

[–] axzxc1236@lemm.ee 1 points 11 hours ago* (last edited 11 hours ago)

In my case just disable IPv6 in WiFi is enough.

sysctl looks like the most universal way.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1