only allow ssh over tailscale
change
commit 1cdef155083d3ebf8717122b9f7c21cf0a5d7fc2
author Alpha Chen <alpha@kejadlen.dev>
date
parent caf57d5c
diff --git a/lotus-land-story/ufw.yml b/lotus-land-story/ufw.yml
index cb466c4..3a9442f 100644
--- a/lotus-land-story/ufw.yml
+++ b/lotus-land-story/ufw.yml
@@ -2,6 +2,16 @@
   hosts: lotus-land-story
   tasks:
 
+    - name: Enable ufw
+      community.general.ufw:
+        state: enabled
+
+    - name: Allow access from tailscale
+      community.general.ufw:
+        rule: allow
+        interface_in: tailscale0
+      notify: Reload ufw
+
     - name: Get docker network for ufw
       community.docker.docker_network:
         name: lotus_land_story
@@ -13,12 +23,6 @@
         from_ip: "{{ docker_network.network.IPAM.Config[0].Subnet }}"
       notify: Reload ufw
 
-    - name: Allow SSH access
-      community.general.ufw:
-        rule: allow
-        name: OpenSSH
-      notify: Reload ufw
-
   handlers:
     - name: Import restarts
       ansible.builtin.import_tasks: restarts.yml