hotfix vpn

This commit is contained in:
rasmus-kirk
2024-08-07 09:16:22 +02:00
parent d549ba8e37
commit cb981986d3
2 changed files with 35 additions and 8 deletions
+32 -5
View File
@@ -29,17 +29,44 @@ Then you can set that port for a service, for example
## Debugging Ports
**Note:** See [this GH issue](https://github.com/rasmus-kirk/nixarr/issues/27)
first, since it's a common problem
You can debug an open port using the
[nixarr.vpn.vpnTestService](https://nixarr.com/options.html#nixarr.vpn.vpntestservice.enable).
[nixarr.vpn.vpnTestService](https://nixarr.com/options.html#nixarr.vpn.vpntestservice.enable):
```nix {.numberLines}
nixarr.vpn.vpnTestService = {
enable = true;
port = 12345;
};
```
The service should be started automatically, to rerun it:
```sh
systemctl restart vpnTestService
```
If the DNS and IP checks out, it will
open a `netcat` instance on the port specified in
[nixarr.vpn.vpnTestService.port](https://nixarr.com/options.html#nixarr.vpn.vpntestservice.port).
You can then run:
You can then run the following from any computer:
```sh
nc <public VPN ip> <specified port>
```
Where the "_public VPN ip_" is the one shown in the `vpnTestService` logs as
your ip. Upon succesful connection type messages that _should_ show up in the
`vpnTestService` logs.
Where the "`public VPN ip`" is the public IP of your VPN address, i.e. the
one shown in the `vpnTestService` logs as your ip:
```
```
Upon succesful connection type messages that _should_ show up in the
`vpnTestService` logs. Reminder, to check the logs:
```sh
journalctl -xeu vpnTestService
```
+1 -1
View File
@@ -247,7 +247,7 @@ in {
vpnnamespaces.wg = mkIf cfg.vpn.enable {
enable = true;
openVPNPorts = optional cfg.vpn.vpnTestService.port != null {
openVPNPorts = optional (cfg.vpn.vpnTestService.port != null) {
port = cfg.vpn.vpnTestService.port;
protocol = "tcp";
};