#
Proxmox Installation
By
Adrien
#
repositories update
apt update
apt dist-upgrade
deb [http://ftp.debian.org/debian](http://ftp.debian.org/debian) bullseye main contrib
deb [http://ftp.debian.org/debian](http://ftp.debian.org/debian) bullseye-updates main contrib
#
security updates
- On a terminal, type :
deb [http://security.debian.org/debian-security](http://security.debian.org/debian-security) bullseye-security main contrib
- Edit /etc/apt/sources.list.d/pve-enterprise.list
nano /etc/apt/sources.list.d/pve-enterprise.list
#deb https://enterprise.proxmox.com/debian/pve
apt-get update
apt dist-upgrade
reboot
#
SSH Security
- Add new user
adduser proxmoxssh
usermod -aG sudo proxmoxssh
su - proxmoxssh
mkdir ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys # add your public ssh key here
chmod 600 ~/.ssh/authorized_keys
- Edit sshd
nano /etc/ssh/sshd_config
Port 1111 # chnge your ssh port here
PermitRootLogin no
PasswordAuthentication no
Then restart sshd
/etc/init.d/ssh restart
With these modifications, the number of attack should be reduced in /var/log/auth.log
- Install fail2ban
sudo apt install fail2ban
nano /etc/fail2ban/jail.local
[DEFAULT]
bantime = 84600 # 2d
findtime = 600
maxretry = 3
destemail = adrien.palu@hotmail.fr # your email here
sendername = Fail2ban
action = %(action_mwl)s
[sshd]
enabled = true
port = 22 # your ssh port here (> 1000)
And then restart fail2ban
systemctl restart fail2ban
You can check fail2ban authentication here : /var/log/fail2ban.log
- Configure Postfix for email
dpkg-reconfigure postfix
Choose the following options :
- Internet Site.
- System mail name = proxmox.example.com
- Postmaster mail recipient = tomtom # your name here
- Other destinations to accept mail from : proxmox, proxmox.example.com, proxmox.example.com, localhost.example.com, localhost
- Force synchronous updates on mail queue ? No
- Local networks = no changes
- Mailbox size limit = 0
- Local address extension character = +
- Internet Protocols = all
systemctl restart postfix
- Add Proxmox user
adduser proxmox
sudo passwd proxmox
pveum groupadd admin -comment "System Administrators"
pveum aclmod / -group admin -role Administrator
pveum usermod proxmox@pam -group admin
- Update Fail2ban for proxmox user
nano /etc/fail2ban/jail.local
Add this block :
[proxmox]
enabled = true
port = https,http,8006
filter = proxmox
logpath = /var/log/daemon.log
maxretry = 3
# 1 hour
bantime = 3600
And create this file /etc/fail2ban/filter.d/proxmox.conf with :
[Definition]
failregex = pvedaemon\[.*authentication failure; rhost=<HOST> user=.* msg=.*
ignoreregex =
And then restart fail2ban
systemctl restart fail2ban
#
Storage
- Create ZFS from your node > Disks > ZFS > Create
if "no disk unused", then wipe the disk
fdisk /dev/sda
- then P for partition, then D for delete, then W for write.
#
check SMART Monitoring
smartctl -a /dev/sda
#
IOMMU (PCI Passthrough)
- edit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
- Update GRUB
update-grub
- edit /etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
- Update configuration and reboot
update-initramfs -u -k all
reboot
#
Network
#
VLAN aware
- Go to your node > Network > vmbr0 > check VLAN aware
#
NFS Share
- Add your NFS Share on your node > Storage > Add > NFS based on TrueNAS Server
#
Schedule Backup
- Go to Datacenter > Backup > Create
- Import ISO / VirtIO / Templates
- Create VM /CT
#
Create new user
- Create a folder for new_user on TrueNas in "USER" and export NFS/SMB point
- Create new user on TrueNas with rights permissions
- Create new user in FileBrowser with access to "user > new_user"
- Create new user in Jellyfin
- Create new invitation in Bitwarden
- Create new Win11 VM and connect SMB share on "user > new_user"