diff --git a/RPi3.md b/RPi3.md
index 31aeb64e..c76440aa 100644
--- a/RPi3.md
+++ b/RPi3.md
@@ -99,10 +99,15 @@ Install UFW:
sudo apt install ufw
```
-This command allows SSH connections from your LAN only.
-**⚠️ Replace `192.168.1.0` with your own subnet:**
+This command allows SSH connections from internal networks only:
```bash
-sudo ufw allow from 192.168.1.0/24 to any port 22
+sudo ufw allow from 10.0.0.0/8 to any port 22 proto tcp
+sudo ufw allow from 172.16.0.0/12 to any port 22 proto tcp
+sudo ufw allow from 192.168.0.0/16 to any port 22 proto tcp
+sudo ufw allow from 169.254.0.0/16 to any port 22 proto tcp
+sudo ufw allow from fc00::/7 to any port 22 proto tcp
+sudo ufw allow from fe80::/10 to any port 22 proto tcp
+sudo ufw allow from ff00::/8 to any port 22 proto tcp
```
These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):
diff --git a/RPi4.md b/RPi4.md
index 5abf7e59..714af166 100644
--- a/RPi4.md
+++ b/RPi4.md
@@ -183,11 +183,16 @@ ufw default deny incoming
ufw default allow outgoing
```
-This command allows SSH connections from your LAN only.
-**⚠️ Replace `192.168.1.0` with your own subnet:**
+This command allows SSH connections from internal networks only:
```bash
-sudo ufw allow from 192.168.1.0/24 to any port 22
+ufw allow from 10.0.0.0/8 to any port 22 proto tcp
+ufw allow from 172.16.0.0/12 to any port 22 proto tcp
+ufw allow from 192.168.0.0/16 to any port 22 proto tcp
+ufw allow from 169.254.0.0/16 to any port 22 proto tcp
+ufw allow from fc00::/7 to any port 22 proto tcp
+ufw allow from fe80::/10 to any port 22 proto tcp
+ufw allow from ff00::/8 to any port 22 proto tcp
```
These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):