CollabVPN: Difference between revisions
Jump to navigation
Jump to search
(added link to forkie.dev) |
(Add basic tutorial using systemd-networkd) |
||
Line 9: | Line 9: | ||
* It is currently hosted on a VPS at [https://www.urdn.com.ua/ Ukrainian Data Network] but there are plans to move it to her own ASN once she is an LIR at RIPE. |
* It is currently hosted on a VPS at [https://www.urdn.com.ua/ Ukrainian Data Network] but there are plans to move it to her own ASN once she is an LIR at RIPE. |
||
* WireGuard Endpoint: <code>collabvpn.julias.zone:80</code> |
* WireGuard Endpoint: <code>collabvpn.julias.zone:80</code> |
||
==== Used IP-Addresses ==== |
|||
{| class="wikitable" |
{| class="wikitable" |
||
|+ |
|||
!Used For |
!Used For |
||
!Pool |
!Pool |
||
Line 35: | Line 36: | ||
|These IPv4 ports can be routed to peers on demand. |
|These IPv4 ports can be routed to peers on demand. |
||
|} |
|} |
||
=== Tutorials === |
|||
==== Using systemd-networkd ==== |
|||
# Create a file named <code>/etc/systemd/network/collabvpn.netdev</code> |
|||
# Put the following content into it <code>[NetDev]</code> <code>Name=collabvpn</code><code>Kind=wireguard</code><code>[WireGuard]</code><code>PrivateKey=<YourPrivateKey,SeeBelow!></code><code>[WireGuardPeer]</code><code>PublicKey=DMXzEWzUWoPfV8lJympy1TLsCrCZMkcf/kRofQjg+Gs=</code><code>AllowedIPs=::/0, 0.0.0.0/0</code><code>Endpoint=collabvpn.julias.zone:80</code> |
|||
# Set the file permissions using <code>chown root:systemd-network /etc/systemd/network/collabvpn.netdev</code> <code>chmod 0640 /etc/systemd/network/collabvpn.netdev</code> |
|||
# You can generate a keypair using <code>KEY=`wg genkey`; echo PrivateKey $KEY; echo PublicKey `echo $KEY | wg pubkey`</code> It is important that you keep PrivateKey PRIVATE, as the name states it. DO NOT share it with anyone. |
|||
# Put the PrivateKey into the config. |
|||
# Send Julia your PublicKey, see below. Wait for her to respond and then continue. |
|||
# Create a file named <code>/etc/systemd/network/collabvpn.network</code> |
|||
# Put the following content into it <code>[Match]</code> <code>Name=collabvpn</code><code>[Network]</code><code>Address=<YourIPv6Address></code><code>Address=<YourIPv4Address></code><code>DNS=2a0f:e586:f:2c00::2</code><code>DNS=10.2.6.2</code> |
|||
# Fill in your addresses. IMPORTANT: Do not fill in your /64 as your address, fill in your /128. Your /64 is routed over that address and will be unusable if configured improperly. |
|||
# Setup a NAT for IPv4, setup a router advertisements for IPv6 and you're good to go. |
|||
=== Requesting a Tunnel === |
=== Requesting a Tunnel === |
||
Line 58: | Line 74: | ||
* Further technical details like blocked ports |
* Further technical details like blocked ports |
||
* Tutorial using ifupdown/wg-quick and radvd |
|||
* Extend tutorial for systemd-networkd to include DHCPv4 server and router advertisements |
Revision as of 20:08, 6 May 2024
CollabVPN is a VPN provided to users who want to host CollabVMs/UserVMs but don't want to use their existing ISP/NSP as an exit.
It is not affiliated with Computernewb or CollabVM in any way.
This was created by Julia because many commercial VPN providers are not equipping users with enough global IPv6 addresses, resulting in an IPv4-only or IPv4-prefferred network.
Technical details
- It is currently hosted on a VPS at Ukrainian Data Network but there are plans to move it to her own ASN once she is an LIR at RIPE.
- WireGuard Endpoint:
collabvpn.julias.zone:80
Used IP-Addresses
Used For | Pool | Description |
---|---|---|
IPv6 Peers | 2a0f:e586:f:2c02::/64 | These are assigned to the WireGuard peers and are used to route their /64s |
IPv6 Pool | 2a0f:e586:f:2c10::/60 | This pool contains 16 /64s for assignment to peers. More can be added once necessary. |
IPv4 Peers | 10.1.1.0/24 | This pool contains 254 IPv4 addresses used for NAT purposes assigned to the peers. |
IPv4 SRCNAT | 193.218.118.174:49152-65535 | The NAT uses these ports for outgoing IPv4 connections. |
IPv4 DSTNAT | 193.218.118.174:1024-49151 | These IPv4 ports can be routed to peers on demand. |
Tutorials
Using systemd-networkd
- Create a file named
/etc/systemd/network/collabvpn.netdev
- Put the following content into it
[NetDev]
Name=collabvpn
Kind=wireguard
[WireGuard]
PrivateKey=<YourPrivateKey,SeeBelow!>
[WireGuardPeer]
PublicKey=DMXzEWzUWoPfV8lJympy1TLsCrCZMkcf/kRofQjg+Gs=
AllowedIPs=::/0, 0.0.0.0/0
Endpoint=collabvpn.julias.zone:80
- Set the file permissions using
chown root:systemd-network /etc/systemd/network/collabvpn.netdev
chmod 0640 /etc/systemd/network/collabvpn.netdev
- You can generate a keypair using
KEY=`wg genkey`; echo PrivateKey $KEY; echo PublicKey `echo $KEY | wg pubkey`
It is important that you keep PrivateKey PRIVATE, as the name states it. DO NOT share it with anyone. - Put the PrivateKey into the config.
- Send Julia your PublicKey, see below. Wait for her to respond and then continue.
- Create a file named
/etc/systemd/network/collabvpn.network
- Put the following content into it
[Match]
Name=collabvpn
[Network]
Address=<YourIPv6Address>
Address=<YourIPv4Address>
DNS=2a0f:e586:f:2c00::2
DNS=10.2.6.2
- Fill in your addresses. IMPORTANT: Do not fill in your /64 as your address, fill in your /128. Your /64 is routed over that address and will be unusable if configured improperly.
- Setup a NAT for IPv4, setup a router advertisements for IPv6 and you're good to go.
Requesting a Tunnel
It is possible to request a WireGuard tunnel from Julia (wiki, website) that you can connect to and tunnel your VMs over.
You need to include the following information when requesting a tunnel:
- Your WireGuard public key
- Your GPG public key (optional, but nice to have for extra security like WireGuard PSKs). Sign and encrypt it with 0075530C72926390787F472D2CB69D1DB326E875 if you like.
- How many /64 IPv6 subnets you need, aka how many bridges you want to tunnel.
- What firewall configuration you want:
- Restricted
- Only outbound IPv6 and IPv4 connections are permitted.
- Inbound connections are filtered and only responses/packets from tracked connections are let in.
- This is the default unless you explicitly request exposure.
- Exposed
- Also inbound connections are let in on IPv6 and IPv4.
- You can request to have a few IPv4 ports routed to you.
- You can request to have subdomains on forkie.dev aswell as RDNS on IPv6.
- Hosting WebServers is possible thanks to snid. Simply tell users to host an HTTPS server on 443 with your subdomain and IPv4 connections from for example 192.0.2.0 will show up to come from the IPv6 NAT64 subnet of 64:ff9b:1:fffe:80:ff7f::/96, so it would be 64:ff9b:1:fffe:80:ff7f:192.0.2.0 aka 64:ff9b:1:fffe:80:ff7f:c000:200.
- Restricted
To Do
- Further technical details like blocked ports
- Tutorial using ifupdown/wg-quick and radvd
- Extend tutorial for systemd-networkd to include DHCPv4 server and router advertisements