Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
finzzz committed Feb 14, 2022
1 parent 05e2d8c commit d7b188f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 83 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
CLI based wireguard server manager. Tested on Debian Bullseye.

## Features
- Plain IPv4 installation with multiple interfaces
- Plain IPv4 installation
- Multi interfaces support
- IPv6
- NAT
- Full routing
Expand Down Expand Up @@ -30,7 +31,7 @@ There are 2 types of connection:
- You need to have an IPv6 address and a block of /64 IPv6 addresses.
- IPv6 address should be assigned to main interface and /64 is reserved for wireguard
- If you only get /64 from VPS provider, you need to split it into smaller blocks and install ndppd (see [example](docs/fr.md))
- If you don't have it, you can get free IPv6 from [Tunnelbroker](https://tunnelbroker.net/) (see [example]](docs/tunnelbroker.md))
- If you don't have it, you can get free IPv6 from [Tunnelbroker](https://tunnelbroker.net/) (see [example](docs/tunnelbroker.md))
<details>
<summary>see image</summary>
<img src="https://raw.githubusercontent.com/finzzz/wgzero/master/static/fr.jpg" width="500" height="275">
Expand All @@ -51,7 +52,7 @@ wgzero install
- [Tunnerbroker](docs/tunnelbroker.md)

## Backup and restore
Backup is simple, just save /etc/wireguard/<interface name>.conf. All of the data including clients are stored in that file.
Backup is simple, just save `/etc/wireguard/<interface name>.conf`. All of the data including clients are stored in that file.
To restore, simply run `wgzero import <interface name>.conf` on new host.

## Other Commands
Expand Down
79 changes: 1 addition & 78 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Initial steps on debian
### Initial steps on debian buster
```bash
echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
apt update && apt upgrade
Expand All @@ -21,80 +21,3 @@ ufw route allow in on wg0 out on eth0
# 2b. Alternatively, you can allow all forwarding using
ufw default allow routed
```

### Full IPv6 routing on Hetzner and Vultr
***Install ndppd before proceeding***

#### Hetzner
By default, hetzner allocated a block of IPv6, such as `2a2a:fafa:caca:baba::/64`.
But address `2a2a:fafa:caca:baba::1/64` is attached to the default network.
So, in order for this to work, we need to split this block into smaller one.
In this example, I will arbitrarily use `2a2a:fafa:caca:baba:dada::/80`.

#### Vultr
Similar to hetzner, if you enabled IPv6, you can go to `Settings -> IPv6` section.
The entry should be similar to this,
| Address | Network | Netmask | Default Gateway |
| ------------------------- | --------------------- | ------- | ---------------------- |
| 2a2a:fafa:caca:baba::abcd | 2a2a:fafa:caca:baba:: | 64 | (use router discovery) |


#### Example
```
root@vultr:~# ./wgzero install
Config folder .wgzero already exists, do you want to overwrite [y/N]: y
Available interfaces :
ens3
Interface [ens3]:
Server [45.76.111.176]:
Port [31407]:
Subnet [10.10.0.1/24]:
Specify private key [none]:
Enable IPv6 [y/N]: y
IPv6 Prefix [fd00::]: 2a2a:fafa:caca:baba:dada::
IPv6 Subnet [64]: 80
External routing:
[1] NAT
[2] Full Routing
Selection [1]: 2
Configure ndppd [y/N]: y
ndppd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ndppd
Done, make sure 31407/UDP is open
```

/etc/network/interfaces
```
auto ens3
iface ens3 inet dhcp
iface ens3 inet6 static
address 2a2a:fafa:caca:baba:caca::1 # this must be in another subnet of IPv6 Prefix
netmask 80
```

```
root@vultr:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500 qdisc fq state UP group default qlen 1000
link/ether 56:00:03:d8:e7:8e brd ff:ff:ff:ff:ff:ff
inet 66.42.40.46/23 brd 66.42.41.255 scope global dynamic enp1s0
valid_lft 86391sec preferred_lft 86391sec
inet6 2a2a:fafa:caca:baba:caca::1/80 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5400:3ff:fed8:e78e/64 scope link
valid_lft forever preferred_lft forever
3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet 10.10.0.1/24 scope global wg0
valid_lft forever preferred_lft forever
inet6 2a2a:fafa:caca:baba:dada::336c/80 scope global
valid_lft forever preferred_lft forever
```

> 2a2a:fafa:caca:baba::1/64 shouldn't be assigned to ens3
8 changes: 6 additions & 2 deletions docs/fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ iface enp1s0 inet6 static
netmask 80
```
> reboot after changing network config
3. Install
3. Install ndppd
```
apt install ndppd
```
4. Install
```
root@vultr:~# wgzero install
Wireguard Interface Name [wg0]:
Expand All @@ -54,7 +58,7 @@ ndppd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ndppd
Done, make sure 15173/UDP is open
```
4. Checking from client
5. Checking from client
```bash
curl http://v4.ipv6-test.com/api/myip.php # ipv4 test
curl http://v6.ipv6-test.com/api/myip.php # ipv6 test
Expand Down

0 comments on commit d7b188f

Please sign in to comment.