Skip to content

Commit f2175ed

Browse files
enesoztrkbrianmcgillion
authored andcommitted
docs: wireguard-gui
Signed-off-by: Enes Öztürk <[email protected]>
1 parent 7348940 commit f2175ed

File tree

14 files changed

+47
-39
lines changed

14 files changed

+47
-39
lines changed
-14.8 KB
Loading
4.29 KB
Loading
26.6 KB
Loading
-19.5 KB
Loading
-417 Bytes
Loading

docs/src/content/docs/ghaf/dev/ref/wireguard-gui.mdx

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ import { Aside } from "@astrojs/starlight/components";
2121
wireguard-gui service should be enabled to appear ```Wireguard GUI``` button.
2222
It can be enabled to add vm nix config like following:
2323
```nix
24-
ghaf.reference.services.wireguard-gui.enable =true;
24+
ghaf.reference.services.wireguard-gui.enable = true;
2525
```
2626
</Aside>
2727

2828
![Wireguard GUI template](@assets/ghaf/wireguard_gui_template_cfg.png)
2929

30-
3. **Click the ```Generate Configs``` to generate template configuration files**
31-
4. **Enter your configuration details for required sections**
32-
5. **Click the ```Generate``` button**
30+
3. **Click the ```Generate Config``` button to generate a new tunnel configuration, which will appear on the list with the ```unknown``` name**
31+
4. **Enter your configuration details for required sections such as ```# Name```, ```# Address```, etc.**
32+
5. **Click the ```Save``` button — a confirmation dialog will appear once the configuration is saved successfully**
3333

3434
![Wireguard GUI configuration](@assets/ghaf/wireguard_gui_config.png)
3535

@@ -60,14 +60,33 @@ You can try to ping: ```ping 10.10.10.0```
6060
Use this mode if you want all network traffic to be routed through the VPN tunnel for maximum privacy and encryption.
6161
![Wireguard full tunnelling configuration](@assets/ghaf/wireguard_full_tunelling.png)
6262

63-
You can run ```curl ifconfig.me``` command and response should be vpn server's public IP. For our case it should be ```1.2.3.4```
63+
You can run ```curl ifconfig.me``` command from ```chrome-vm``` and response should be vpn server's public IP. For our case it should be ```1.2.3.4```
64+
65+
<Aside type="caution">
66+
- This configuration will not work from the `business-vm` due to its firewall configuration.
67+
</Aside>
6468

6569
### 3. VPN as server
6670
Configure WireGuard as a server to accept connections from multiple clients.
6771

6872
![Wireguard as server configuration](@assets/ghaf/wireguard_server_cfg.png)
6973

70-
You can try to ping: ```ping 10.10.10.0```
74+
You can try to ping from test client: ```ping 10.10.10.4```
75+
76+
<Aside>
77+
- You have to enable ```serverPorts``` in nix file.
78+
```nix
79+
ghaf.reference.services.wireguard-gui = {
80+
enable = true;
81+
serverPorts = [ 51820 ];
82+
};
83+
```
84+
</Aside>
85+
<Aside type="caution">
86+
- In the default Ghaf image, business-vm uses port ```51821``` and chrome-vm uses port ```51822``` for WireGuard server mode.
87+
When configuring server mode, set ```ListenPort``` to 51821 in business-vm and 51822 in chrome-vm.
88+
</Aside>
89+
7190

7291
<Aside>
7392
- You can use an IP calculator to help generate correct `AllowedIPs` values: [WireGuard AllowedIPs Calculator](https://www.procustodibus.com/blog/2021/03/wireguard-allowedips-calculator/)

flake.lock

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190

191191
# A UI for the one true VPN: Wireguard
192192
wireguard-gui = {
193-
url = "github:enesoztrk/wireguard-gui/feat/routing_scripts";
193+
url = "github:tiiuae/wireguard-gui";
194194
inputs = {
195195
nixpkgs.follows = "nixpkgs";
196196
flake-utils.follows = "flake-utils";

modules/common/firewall/firewall.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ in
430430
### FORWARD rules ###
431431
iptables -t filter -A ghaf-fw-fwd-filter -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
432432
433-
434433
### OUTPUT rules ###
435434
436435
### POSTROUTING rules ###

modules/reference/appvms/business.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ in
271271
# Enable WireGuard GUI
272272
wireguard-gui = {
273273
enable = config.ghaf.reference.services.wireguard-gui;
274-
serverPorts = [ 51820 ];
274+
serverPorts = [ 51821 ];
275275
};
276276

277277
};

0 commit comments

Comments
 (0)