Proxmox

Default Setting / Initial Step

Abstract

How to install and set up Proxmox for the first time.

 

How to do?

1. Download & Install Proxmox

https://www.proxmox.com/en/downloads/category/iso-images-pve

 

2. Access Web page

https://[IP]:8006

 

3. comment out apt enterprise source list

vi /etc/apt/sources.list.d/pve-enterprise.list​ : comment out
    #deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise

 

4. Add apt source list for non-subscribe & apt update

vi /etc/apt/sources.list​
    # Add Line 5-6
    1 deb http://ftp.kr.debian.org/debian bullseye main contrib
    2
    3 deb http://ftp.kr.debian.org/debian bullseye-updates main contrib
    4
    5 # No subscription
    6 deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
    7
    8 # security updates
    9 deb http://security.debian.org bullseye-security main contrib

apt update
apt upgrade -y

 

5. Remove subscription notification message

vi /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
    # modify Line 515
    # AS-IS : Ext.Meg.show({
    # TO-BE : void({
    513	if (res === null || res === undefined || !res || res
    514		.data.status.toLowerCase() !== 'active') {
    515			void({
    516			title: gettext('No valid subscription'),

systemctl restart pveproxy.service

 

6. adjust LVM capacity

# check partition
df -h
fdisk -l
vgdisplay -v

# Delete /dev/pve/data
lvremove /dev/pve/data

# extend capacity /dev/pve/root
lvextend -l +100%FREE /dev/pve/root
resize2fs -p /dev/pve/root

# re-check partition
df -h
fdisk -l
vgdisplay -v

 

7. setup network

vi /etc/network/interfaces
    12 auto lo
    13 iface lo inet loopback
    14
    15 iface eno1 inet manual
    16
    17 iface eno2 inet manual
    18
    19 auto vmbr0
    20 iface vmbr0 inet static
    21         address [PUBLIC IP]/[NETMASK]
    22         gateway [GATEWAY]
    23         bridge-ports eno1
    24         bridge-stp off
    25         bridge-fd 0
    26
    27 auto vmbr100
    28 iface vmbr100 inet static
    29         address [PRIVATE IP]/[NETMASK]
    30         bridge-ports none
    31         bridge-stp off
    32         bridge-fd 0
    33 /etc/network/interfaces

 

8. setup iptables rules

# install netfilter-persistent
apt install netfilter-persistent

# save persistent iptables rules
netfilter-persistent save

# iptables file
vi /etc/iptables/rules.v4

# Default rules
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -s [Office IP]/24 -j ACCEPT
iptables -A INPUT -s [Access IP]/32 -j ACCEP
iptables -P INPUT DROP

# NAT rules
iptables -A PREROUTING -d [Host IP]/32 -p tcp -m tcp --dport [Host Port] -j DNAT --to-destination [Guest IP]:[Guest Port]
iptables -A POSTROUTING -s [Guest Network]/24 -j MASQUERADE

 

9. Done.

Access web page & enjoy 😊

 

 

 

Reference

https://nad4.tistory.com/entry/Proxmox-%EC%84%A4%EC%B9%98-%EB%B0%8F-%EC%B4%88%EA%B8%B0-%ED%95%84%EC%88%98-%EC%84%A4%EC%A0%95

https://blog.djjproject.com/723

https://malwareanalysis.tistory.com/191

https://blog.cyberhacktics.com/virtual-machine-tips-and-tricks-1-transferring-files/

Back To Top