Skip to content

Commit

Permalink
Move from 2001:db8::/32 to fc00::/7 addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
neacsu committed Oct 30, 2024
1 parent 8b661cb commit df5ee70
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 17 deletions.
5 changes: 1 addition & 4 deletions common/authenticator-requests/src/v4/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ mod tests {
let client = GatewayClient::new(
client_key_pair.private_key(),
x25519_dalek::PublicKey::from(gateway_key_pair.public_key().to_bytes()),
IpPair::new(
"10.0.0.42".parse().unwrap(),
"2001:db8:a160:1::42".parse().unwrap(),
),
IpPair::new("10.0.0.42".parse().unwrap(), "fc00::42".parse().unwrap()),
nonce,
);
assert!(client.verify(gateway_key_pair.private_key(), nonce).is_ok())
Expand Down
2 changes: 1 addition & 1 deletion common/ip-packet-requests/src/v6/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ mod tests {
data: IpPacketRequestData::StaticConnect(
StaticConnectRequest {
request_id: 123,
ips: IpPair::new(Ipv4Addr::from_str("10.0.0.1").unwrap(), Ipv6Addr::from_str("2001:db8:a160::1").unwrap()),
ips: IpPair::new(Ipv4Addr::from_str("10.0.0.1").unwrap(), Ipv6Addr::from_str("fc00::1").unwrap()),
reply_to: Recipient::try_from_base58_string("D1rrpsysCGCYXy9saP8y3kmNpGtJZUXN9SvFoUcqAsM9.9Ssso1ea5NfkbMASdiseDSjTN1fSWda5SgEVjdSN4CvV@GJqd3ZxpXWSNxTfx7B1pPtswpetH4LnJdFeLeuY5KUuN").unwrap(),
reply_to_hops: None,
reply_to_avg_mix_delays: None,
Expand Down
2 changes: 1 addition & 1 deletion common/ip-packet-requests/src/v7/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ mod tests {
SignedStaticConnectRequest {
request: StaticConnectRequest {
request_id: 123,
ips: IpPair::new(Ipv4Addr::from_str("10.0.0.1").unwrap(), Ipv6Addr::from_str("2001:db8:a160::1").unwrap()),
ips: IpPair::new(Ipv4Addr::from_str("10.0.0.1").unwrap(), Ipv6Addr::from_str("fc00::1").unwrap()),
reply_to: Recipient::try_from_base58_string("D1rrpsysCGCYXy9saP8y3kmNpGtJZUXN9SvFoUcqAsM9.9Ssso1ea5NfkbMASdiseDSjTN1fSWda5SgEVjdSN4CvV@GJqd3ZxpXWSNxTfx7B1pPtswpetH4LnJdFeLeuY5KUuN").unwrap(),
reply_to_hops: None,
reply_to_avg_mix_delays: None,
Expand Down
3 changes: 1 addition & 2 deletions common/network-defaults/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ pub mod wireguard {
pub const WG_TUN_DEVICE_ADDRESS: &str = "10.1.0.1";
pub const WG_TUN_DEVICE_IP_ADDRESS_V4: Ipv4Addr = Ipv4Addr::new(10, 1, 0, 1);
pub const WG_TUN_DEVICE_NETMASK_V4: u8 = 16;
pub const WG_TUN_DEVICE_IP_ADDRESS_V6: Ipv6Addr =
Ipv6Addr::new(0x2001, 0xdb8, 0xa160, 1, 0, 0, 0, 0x1); // 2001:db8:a160:1::1
pub const WG_TUN_DEVICE_IP_ADDRESS_V6: Ipv6Addr = Ipv6Addr::new(0xfc01, 0, 0, 0, 0, 0, 0, 0x1); // fc01::1
pub const WG_TUN_DEVICE_NETMASK_V6: u8 = 112;
}
2 changes: 1 addition & 1 deletion common/wireguard-types/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct Config {
pub private_ipv4: Ipv4Addr,

/// Private IPv6 address of the wireguard gateway.
/// default: `2001:db8:a160:1::1`
/// default: `fc01::1`
pub private_ipv6: Ipv6Addr,

/// Port announced to external clients wishing to connect to the wireguard interface.
Expand Down
4 changes: 2 additions & 2 deletions documentation/operators/src/nodes/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Run the following steps as root or with `sudo` prefix!
~~~admonish example collapsible=true title="Correct `./network_tunnel_manager.sh fetch_and_display_ipv6` output:"
```sh
iptables-persistent is already installed.
Using IPv6 address: 2001:db8:a160::1/112 #the address will be different for you
Using IPv6 address: fc00::1/112 #the address will be different for you
operation fetch_ipv6_address_nym_tun completed successfully.
```
~~~
Expand Down Expand Up @@ -352,7 +352,7 @@ ip addr show nymtun0
link/none
inet 10.0.0.1/16 scope global nymtun0
valid_lft forever preferred_lft forever
inet6 2001:db8:a160::1/112 scope global
inet6 fc00::1/112 scope global
valid_lft forever preferred_lft forever
inet6 fe80::ad08:d167:5700:8c7c/64 scope link stable-privacy
valid_lft forever preferred_lft forever`
Expand Down
4 changes: 2 additions & 2 deletions documentation/operators/src/nodes/nym-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ sudo ./network_tunnel_manager.sh fetch_and_display_ipv6
~~~admonish example collapsible=true title="Correct `./network_tunnel_manager.sh fetch_and_display_ipv6` output:"
```sh
iptables-persistent is already installed.
Using IPv6 address: 2001:db8:a160::1/112 #the address will be different for you
Using IPv6 address: fc00::1/112 #the address will be different for you
operation fetch_ipv6_address_nym_tun completed successfully.
```
~~~
Expand Down Expand Up @@ -90,7 +90,7 @@ ip addr show nymtun0
link/none
inet 10.0.0.1/16 scope global nymtun0
valid_lft forever preferred_lft forever
inet6 2001:db8:a160::1/112 scope global
inet6 fc00::1/112 scope global
valid_lft forever preferred_lft forever
inet6 fe80::ad08:d167:5700:8c7c/64 scope link stable-privacy
valid_lft forever preferred_lft forever`
Expand Down
2 changes: 1 addition & 1 deletion nym-node/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ pub struct Wireguard {
pub private_ipv4: Ipv4Addr,

/// Private IPv6 address of the wireguard gateway.
/// default: `2001:db8:a160:1::1`
/// default: `fc01::1`
pub private_ipv6: Ipv6Addr,

/// Port announced to external clients wishing to connect to the wireguard interface.
Expand Down
2 changes: 1 addition & 1 deletion nym-node/src/config/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bind_address = '{{ wireguard.bind_address }}'
private_ipv4 = '{{ wireguard.private_ipv4 }}'
# Private IP address of the wireguard gateway.
# default: `2001:db8:a160:1::1`
# default: `fc01::1`
private_ipv6 = '{{ wireguard.private_ipv6 }}'
# Port announced to external clients wishing to connect to the wireguard interface.
Expand Down
2 changes: 1 addition & 1 deletion service-providers/authenticator/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ pub struct Authenticator {
pub private_ipv4: Ipv4Addr,

/// Private IP address of the wireguard gateway.
/// default: `2001:db8:a160:1::1`
/// default: `fc01::1`
pub private_ipv6: Ipv6Addr,

/// Port announced to external clients wishing to connect to the wireguard interface.
Expand Down
2 changes: 1 addition & 1 deletion service-providers/ip-packet-router/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::time::Duration;
pub const TUN_BASE_NAME: &str = "nymtun";
pub const TUN_DEVICE_ADDRESS_V4: Ipv4Addr = Ipv4Addr::new(10, 0, 0, 1);
pub const TUN_DEVICE_NETMASK_V4: Ipv4Addr = Ipv4Addr::new(255, 255, 0, 0);
pub const TUN_DEVICE_ADDRESS_V6: Ipv6Addr = Ipv6Addr::new(0x2001, 0xdb8, 0xa160, 0, 0, 0, 0, 0x1); // 2001:db8:a160::1
pub const TUN_DEVICE_ADDRESS_V6: Ipv6Addr = Ipv6Addr::new(0xfc00, 0, 0, 0, 0, 0, 0, 0x1); // fc00::1

pub const TUN_DEVICE_NETMASK_V6: &str = "112";

Expand Down

0 comments on commit df5ee70

Please sign in to comment.