ivpn / desktop-app

Official IVPN Desktop app
https://www.ivpn.net/apps/
GNU General Public License v3.0
351 stars 48 forks source link

Refactor firewall rules for LAN access #300

Closed stenya closed 1 year ago

stenya commented 1 year ago

Feature request

Description

Settings → IVPN Firewall → Allow LAN Traffic when IVPN Firewall is enabled

When this option is enabled, the VPN daemon inspects all currently available local interfaces and permits communication within identified networks using network mask information.

Describe the solution you'd like

Rather than focusing on the specific local networks the user is connected to, I suggest allowing all non-routable IP ranges when the "Allow LAN Traffic" feature is enabled:

Network Mask Type Explanation Reference Document
10.0.0.0/8 IPv4 Private Address Used for private networks RFC 1918
172.16.0.0/12 IPv4 Private Address Used for private networks RFC 1918
192.168.0.0/16 IPv4 Private Address Used for private networks RFC 1918
169.254.0.0/16 IPv4 Auto-IP Used when DHCP fails, for local communication RFC 3927
fc00::/7 IPv6 Unique Local Used for private networks (ULA) RFC 4193
fe80::/10 IPv6 Link-Local Used for local communication, not routable RFC 4291

These ranges comprehensively cover all potential local interface ranges a user might connect to. This approach ensures users can access local networks regardless of changes in their network configurations.

Note: we need to add a '?' popup after the option “Allow LAN traffic when IVPN Firewall is enabled” with the text “This includes traffic to all private address spaces in RFC 1918, 3927, 4193, 4291”.

stenya commented 1 year ago

@gorkapernas v3.11.18

gorkapernas commented 1 year ago

Verified on version 3.12.0, tested LAN on all platforms, with OpenVPN and WireGuard.

I also confirm that the tooltip next to the option “Allow LAN traffic when IVPN Firewall is enabled” has been implemented as described in this ticket.

This is good to go.

stenya commented 1 year ago

v3.12.0 released