#!/bin/sh

ufw allow 22
ufw allow 22/tcp
ufw allow 80
ufw allow 443
ufw allow 8384
ufw allow 2222
ufw allow 8888
ufw allow 4444
ufw allow 32400
ufw allow 21027
ufw allow 22000/tcp
ufw allow 22000/udp
ufw allow 21027/udp

ufw enable

cd /srv
mkdir gitlab gitlab-runner hastebin jellyfin mongodata nextcloud syncthing traefik plex znc

cd /home/null

mkdir shares
mkdir shares/disk1
mkdir shares/disk2
mkdir shares/usb

newgrp docker
usermod -aG docker null


systemctl start fail2ban.service

# docker volume create --driver local --opt type=nfs --opt o=addr=192.168.1.110,rw,vers=4 --opt device=:/media --name nfs_data


# 80                         ALLOW       Anywhere
# 443                        ALLOW       Anywhere
# 22                         ALLOW       Anywhere
# 8384                       ALLOW       Anywhere
# 2222                       ALLOW       Anywhere
# 8888                       ALLOW       Anywhere
# 4444                       ALLOW       Anywhere
# 32400                      ALLOW       Anywhere
# 22,80,443,2222,3040,4444,8096,8097,8384,8888,21027,22000,32400,51820,51821/tcp ALLOW       Anywhere
# 22,80,443,2222,3040,4444,8096,8097,8384,8888,21027,22000,32400,51820,51821/udp ALLOW       Anywhere
# 22000                      ALLOW       Anywhere
# 21027                      ALLOW       Anywhere
# 22000/tcp                  ALLOW       Anywhere
# 22000/udp                  ALLOW       Anywhere
# 21027/udp                  ALLOW       Anywhere
# 80 (v6)                    ALLOW       Anywhere (v6)
# 443 (v6)                   ALLOW       Anywhere (v6)
# 22 (v6)                    ALLOW       Anywhere (v6)
# 8384 (v6)                  ALLOW       Anywhere (v6)
# 2222 (v6)                  ALLOW       Anywhere (v6)
# 8888 (v6)                  ALLOW       Anywhere (v6)
# 4444 (v6)                  ALLOW       Anywhere (v6)
# 32400 (v6)                 ALLOW       Anywhere (v6)
# 22,80,443,2222,3040,4444,8096,8097,8384,8888,21027,22000,32400,51820,51821/tcp (v6) ALLOW       Anywhere (v6)
# 22,80,443,2222,3040,4444,8096,8097,8384,8888,21027,22000,32400,51820,51821/udp (v6) ALLOW       Anywhere (v6)
# 22000 (v6)                 ALLOW       Anywhere (v6)
# 21027 (v6)                 ALLOW       Anywhere (v6)
# 22000/tcp (v6)             ALLOW       Anywhere (v6)
# 22000/udp (v6)             ALLOW       Anywhere (v6)
# 21027/udp (v6)
