Skip to content

Commit eb7732c

Browse files
committed
feat: update firewall rules and remove VPN
1 parent 56a8cdb commit eb7732c

File tree

10 files changed

+37
-72
lines changed

10 files changed

+37
-72
lines changed

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
![GitHub Repo Stars](https://img.shields.io/github/stars/Nitestack/raspberry-pi-5?style=for-the-badge)
1414
![Github Created At](https://img.shields.io/github/created-at/Nitestack/raspberry-pi-5?style=for-the-badge)
1515

16-
[Features](#-features)[Requirements](#️-requirements)[Getting Started](#-getting-started)[Configuration](#-configuration)[Port Forwarding](#-port-forwarding)[Security](#%EF%B8%8F-security)[Backups](#-backups)[License](#-license)
16+
[Features](#-features)[Requirements](#️-requirements)[Getting Started](#-getting-started)[Configuration](#-configuration)[Security](#%EF%B8%8F-security)[Backups](#-backups)[License](#-license)
1717

1818
_This [Ansible](https://ansible.com) configuration automates the setup of a Home Server running [Raspberry Pi OS](https://raspberrypi.com/software). It deploys essential services using a modern, secure, and declarative best-practice architecture._
1919

@@ -47,7 +47,6 @@ _This [Ansible](https://ansible.com) configuration automates the setup of a Home
4747
- **Pocket ID**: OIDC Provider
4848
- **Vaultwarden**: Password Manager
4949
- **wger Workout Manager**: Fitness Tracker
50-
- **WireGuard Easy**: VPN (with Web GUI)
5150
- **Yamtrack**: Media Tracker (TV Shows, TV Seasons, Movies, Anime, Manga, Games, Books, Comics)
5251
- **Zerobyte**: Backup Manager (Web GUI for `restic`)
5352

@@ -120,15 +119,6 @@ cp vault.yml.example group_vars/all/vault.yml # copy template
120119
ansible-vault encrypt group_vars/all/vault.yml # encrypt file
121120
```
122121
123-
## 🔌 Port Forwarding
124-
125-
To ensure remote access and proper functionality, configure the following port forwarding rules on your router. The playbook will automatically configure the server's firewall (UFW) based on these variables.
126-
127-
```plaintext
128-
# WireGuard
129-
public:51820/udp -> local:51820/udp
130-
```
131-
132122
## 🛡️ Security
133123
134124
### 1. Add Your Host to Authorized Keys on the Raspberry Pi

deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
- role: cloudflare_tunnel
1818
tags: cloudflare_tunnel
1919

20-
- role: wg_easy
21-
tags: wg_easy
2220
- role: pocket_id
2321
tags: pocket_id
2422
- role: nextcloud

group_vars/all/main.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ timezone: "Europe/Berlin" # TZ identifier from https://en.wikipedia.org/wiki/Lis
66
data_base_dir: "/mnt/data"
77
backup_base_dir: "/mnt/backup"
88
service_base_dir: "~/services"
9-
allowed_ports:
10-
- 53 # DNS
11-
- 51820 # VPN
129

1310
# ── Service Configuration ─────────────────────────────────────────────
1411
# WARNING: modification of any ports won't work
@@ -112,12 +109,6 @@ services:
112109
domain: "vault.{{ domain }}"
113110
container_name: "vaultwarden"
114111
port: 80
115-
# WireGuard Easy
116-
wg_easy:
117-
enabled: true
118-
domain: "vpn.{{ domain }}"
119-
container_name: "wg-easy"
120-
port: 51821
121112
# wger
122113
wger:
123114
enabled: false

roles/glance/files/config/home.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070
- title: wger
7171
url: https://wger.readthedocs.io
7272
icon: di:wger
73-
- title: WireGuard Easy
74-
url: https://wg-easy.github.io/wg-easy/latest
75-
icon: di:wireguard
7673
- title: Yamtrack
7774
url: https://github.com/FuzzyGrim/Yamtrack/wiki
7875
icon: di:yamtrack
@@ -240,11 +237,6 @@
240237
icon: si:vaultwarden
241238
url: ${VAULTWARDEN_URL}
242239
description: Password Manager
243-
wg-easy:
244-
name: WireGuard Easy
245-
icon: di:wireguard
246-
url: ${WG_EASY_URL}
247-
description: VPN
248240
wger-web:
249241
name: wger
250242
icon: di:wger
@@ -395,7 +387,6 @@
395387
- nextcloud/all-in-one
396388
- pocket-id/pocket-id
397389
- dani-garcia/vaultwarden
398-
- wg-easy/wg-easy
399390
- wger-project/wger
400391
- FuzzyGrim/Yamtrack
401392
- nicotsx/zerobyte

roles/glance/templates/env.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ N8N_URL=https://{{ services.n8n.domain }}
1818
NEXTCLOUD_URL=https://{{ services.nextcloud.domain }}
1919
POCKET_ID_URL=https://{{ services.pocket_id.domain }}
2020
VAULTWARDEN_URL=https://{{ services.vaultwarden.domain }}
21-
WG_EASY_URL=https://{{ services.wg_easy.domain }}
2221
WGER_URL=https://{{ services.wger.domain }}
2322
YAMTRACK_URL=https://{{ services.yamtrack.domain }}
2423
ZEROBYTE_URL=https://{{ services.zerobyte.domain }}

roles/ufw/tasks/main.yml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,45 @@
77
name: ufw
88
update_cache: true
99

10-
- name: Set default UFW policy and enable firewall
10+
- name: Set default policies
1111
community.general.ufw:
1212
state: enabled
13-
policy: "{{ ufw_incoming_policy }}"
13+
14+
- name: Deny incoming
15+
community.general.ufw:
16+
policy: deny
1417
direction: incoming
1518

16-
- name: Allow incoming traffic on specified ports
19+
- name: Deny routed (forward)
20+
community.general.ufw:
21+
policy: deny
22+
direction: routed
23+
24+
- name: Allow outgoing
25+
community.general.ufw:
26+
policy: allow
27+
direction: outgoing
28+
29+
- name: Allow incoming SSH traffic
30+
community.general.ufw:
31+
rule: allow
32+
port: ssh
33+
34+
- name: Allow incoming SSH traffic
35+
community.general.ufw:
36+
rule: allow
37+
port: ssh
38+
39+
- name: Allow incoming DNS traffic over TCP
40+
community.general.ufw:
41+
rule: allow
42+
port: 53
43+
proto: tcp
44+
when: services.adguard_home.enabled
45+
46+
- name: Allow incoming DNS traffic over UDP
1747
community.general.ufw:
1848
rule: allow
19-
port: "{{ item }}"
20-
loop: "{{ allowed_ports }}"
21-
loop_control:
22-
label: "port {{ item }}"
49+
port: 53
50+
proto: udp
51+
when: services.adguard_home.enabled

roles/wg_easy/defaults/main.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

roles/wg_easy/tasks/main.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

roles/wg_easy/templates/compose.override.yml.j2

Lines changed: 0 additions & 21 deletions
This file was deleted.

roles/wg_easy/vars/main.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)