Compare commits

..

No commits in common. "e40c2b698b220073a5141e3940af4b222eaa24d4" and "efe2efd739aadb67520e613cbf9b2b64057a9053" have entirely different histories.

10 changed files with 38 additions and 61 deletions

View File

@ -1,6 +1,3 @@
:no_entry: [DEPRECATED] Developing continues here: https://github.com/kevinveenbirkenbach/computer-playbook
# Client Playbook
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

View File

@ -4,6 +4,7 @@
roles:
- system-pacman
- collection-administrator-base
- application-caffeine
- driver-non-free
- name: application-wireguard

View File

@ -1,2 +1,3 @@
dependencies:
- system-aur-helper
- system-aur-helper
- system-gnome

View File

@ -10,6 +10,35 @@ Manages wireguard on a client.
echo "PresharedKey: $(wg genpsk)"
```
## Debug
### RTNETLINK answers: Permission denied
When ```systemctl restart wg-quick@wg0.service``` returns __RTNETLINK answers: Permission denied__, modify _/etc/sysctl.conf_:
```bash
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
```
Afterwards reload:
```bash
sysctl -p
systemctl restart wg-quick@wg0.service
```
### SSH
When the SSH connection over wireguard is buggy try:
```bash
ip li set mtu 1400 dev eth0
ip li set mtu 1400 dev wlo1
```
This can be connected to the [MTU](https://www.imperva.com/learn/application-security/what-is-mtu-mss/)
## Other
- https://golb.hplar.ch/2019/01/expose-server-vpn.html
- https://wiki.archlinux.org/index.php/WireGuard
@ -21,8 +50,4 @@ Manages wireguard on a client.
- https://forum.openwrt.org/t/cannot-ssh-to-clients-on-lan-when-accessing-router-via-wireguard-client/132709/3
- https://serverfault.com/questions/1086297/wireguard-connection-dies-on-ubuntu-peer
- https://unix.stackexchange.com/questions/624987/ssh-fails-to-start-when-listenaddress-is-set-to-wireguard-vpn-ip
- https://serverfault.com/questions/210408/cannot-ssh-debug1-expecting-ssh2-msg-kex-dh-gex-reply
- https://www.thomas-krenn.com/de/wiki/Linux_ip_Kommando
- https://wiki.archlinux.org/title/dhcpcd
- https://wiki.ubuntuusers.de/NetworkManager/Dispatcher/
- https://askubuntu.com/questions/1024916/how-can-i-launch-a-systemd-service-at-startup-before-another-systemd-service-sta
- https://serverfault.com/questions/210408/cannot-ssh-debug1-expecting-ssh2-msg-kex-dh-gex-reply

View File

@ -1,10 +0,0 @@
[Unit]
Description=set MTU
Before=wg-quick@wg0.service
[Service]
Type=oneshot
ExecStart=set-mtu.sh
[Install]
RequiredBy=wg-quick@wg0.service

View File

@ -1,8 +0,0 @@
# This file is created by
# https://github.com/kevinveenbirkenbach/client-playbook/tree/main/roles/application-wireguard
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.all.forwarding = 1
net.ipv4.ip_forward = 1

View File

@ -1,16 +1,6 @@
- name: "restart set-mtu.service"
systemd:
name: set-mtu.service
state: restarted
enabled: yes
daemon_reload: yes
- name: "restart wireguard"
systemd:
name: wg-quick@wg0.service
state: restarted
enabled: yes
daemon_reload: yes
- name: "reload sysctl configuration"
shell: "sysctl -p"

View File

@ -3,25 +3,11 @@
name: wireguard-tools
state: present
- name: create set-mtu.service
copy:
src: set-mtu.service
dest: /etc/systemd/system/set-mtu.service
notify: restart set-mtu.service
- name: enable ipv4-forwarding
shell: sysctl net.ipv4.ip_forward=1
- name: create set-mtu.sh
template:
src: set-mtu.sh.j2
dest: /usr/local/bin/set-mtu.sh
notify: restart set-mtu.service
- name: create wireguard-ip.conf
copy:
src: "wireguard-ip.conf"
dest: /etc/sysctl.d/wireguard-ip.conf
owner: root
group: root
notify: reload sysctl configuration
- name: enable ipv6-forwarding
shell: sysctl net.ipv6.conf.all.forwarding=1
- name: create /etc/wireguard/wg0.conf
copy:

View File

@ -1,4 +0,0 @@
#!/bin/bash
{% for internet_interface in internet_interfaces %}
ip li set mtu 1400 dev {{internet_interface}}
{% endfor %}

View File

@ -1,3 +1,2 @@
dependencies:
- application-git
- application-caffeine
- application-git