Skip to content

Commit

Permalink
Add missing private IP range
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Dec 8, 2023
1 parent 6873304 commit 45f6cc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The following network traffic is allowed or blocked independent of state:
* `10.0.0.0/8`
* `172.16.0.0/12`
* `192.168.0.0/16`
* `198.18.0.0/15`
* `169.254.0.0/16` (Link-local IPv4 range)
* `fe80::/10` (Link-local IPv6 range)
* `fc00::/7` (Unique local address (ULA) range)
Expand Down
3 changes: 2 additions & 1 deletion talpid-core/src/firewall/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ mod imp;
pub use self::imp::Error;

/// When "allow local network" is enabled the app will allow traffic to and from these networks.
pub(crate) static ALLOWED_LAN_NETS: Lazy<[IpNetwork; 6]> = Lazy::new(|| {
pub(crate) static ALLOWED_LAN_NETS: Lazy<[IpNetwork; 7]> = Lazy::new(|| {
[
IpNetwork::V4(Ipv4Network::new(Ipv4Addr::new(10, 0, 0, 0), 8).unwrap()),
IpNetwork::V4(Ipv4Network::new(Ipv4Addr::new(172, 16, 0, 0), 12).unwrap()),
IpNetwork::V4(Ipv4Network::new(Ipv4Addr::new(192, 168, 0, 0), 16).unwrap()),
IpNetwork::V4(Ipv4Network::new(Ipv4Addr::new(169, 254, 0, 0), 16).unwrap()),
IpNetwork::V4(Ipv4Network::new(Ipv4Addr::new(198, 18, 0, 0), 15).unwrap()),
IpNetwork::V6(Ipv6Network::new(Ipv6Addr::new(0xfe80, 0, 0, 0, 0, 0, 0, 0), 10).unwrap()),
IpNetwork::V6(Ipv6Network::new(Ipv6Addr::new(0xfc00, 0, 0, 0, 0, 0, 0, 0), 7).unwrap()),
]
Expand Down
1 change: 1 addition & 0 deletions windows/winfw/src/winfw/winfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ wfp::IpNetwork g_privateIpRanges[] = {
wfp::IpNetwork(wfp::IpAddress::Literal{172, 16, 0, 0}, 12),
wfp::IpNetwork(wfp::IpAddress::Literal{192, 168, 0, 0}, 16),
wfp::IpNetwork(wfp::IpAddress::Literal{169, 254, 0, 0}, 16),
wfp::IpNetwork(wfp::IpAddress::Literal{198, 18, 0, 0}, 15),
wfp::IpNetwork(wfp::IpAddress::Literal6{0, 0, 0, 0, 0, 0, 0, 1}, 128),
wfp::IpNetwork(wfp::IpAddress::Literal6{0xfe80, 0, 0, 0, 0, 0, 0, 0}, 10),
wfp::IpNetwork(wfp::IpAddress::Literal6{0xfc80, 0, 0, 0, 0, 0, 0, 0}, 7)
Expand Down

0 comments on commit 45f6cc4

Please sign in to comment.