apt update && apt install -y ufw
ufw default deny incoming
ufw allow from 192.168.1.0/24 proto tcp to any port 8000
ufw allow from 192.168.0.0/24 proto tcp to any port 8000
ufw allow from 192.168.2.0/24 proto tcp to any port 8000
ufw allow from 10.0.0.0/24 proto tcp to any port 8000
ufw allow from 192.168.1.0/24 proto tcp to any port 22
ufw allow from 192.168.0.0/24 proto tcp to any port 22
ufw allow from 192.168.2.0/24 proto tcp to any port 22
ufw allow from 10.0.0.0/24 proto tcp to any port 22
ufw allow from 192.168.1.0/24 proto tcp to any port 445
ufw allow from 192.168.0.0/24 proto tcp to any port 445
ufw allow from 192.168.2.0/24 proto tcp to any port 445
ufw allow from 10.0.0.0/24 proto tcp to any port 445
ufw allow from 192.168.1.0/24 proto tcp to any port 5005
ufw allow from 192.168.0.0/24 proto tcp to any port 5005
ufw allow from 192.168.2.0/24 proto tcp to any port 5005
ufw allow from 10.0.0.0/24 proto tcp to any port 5005
ufw enable