|
| 1 | +# Assumes a dedicated server with an assigned ipv6 subnet e.g. from hetzner |
| 2 | + |
| 3 | +# Set hostname |
| 4 | +echo "proxmox1" > /etc/hostname |
| 5 | +# Edit /etc/hosts to set hostname to proxmox1 |
| 6 | + |
| 7 | +# Reload network configuration |
| 8 | +invoke-rc.d hostname.sh start |
| 9 | +invoke-rc.d networking force-reload |
| 10 | + |
| 11 | +# Reboot the system |
| 12 | +reboot |
| 13 | + |
| 14 | +# Add proxmox apt source & key |
| 15 | + |
| 16 | +echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list |
| 17 | + |
| 18 | +wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg |
| 19 | +chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg |
| 20 | + |
| 21 | +# Run update & full upgrade |
| 22 | +apt update && apt full-upgrade -y |
| 23 | + |
| 24 | +# Install proxmox-ve open-iscsi |
| 25 | +apt install proxmox-ve postfix open-iscsi -y |
| 26 | +# Note , the install of proxmox-ve can take over 30minutes |
| 27 | + |
| 28 | +# Choose no for WINS/DHCP, and 'local only' for postfix |
| 29 | + |
| 30 | +# Update grub |
| 31 | +update-grub |
| 32 | + |
| 33 | +# Update /etc/sysctl.conf |
| 34 | + |
| 35 | +net.ipv4.ip_forward=1 |
| 36 | +net.ipv6.conf.all.forwarding=1 |
| 37 | + |
| 38 | + |
| 39 | +# Reboot |
| 40 | +reboot |
| 41 | + |
| 42 | +# After reboot you will be able to access https://176.9.145.50:8006 |
| 43 | + |
| 44 | +# If you can no-longer login via ssh, reset your terminal |
| 45 | +reset |
| 46 | +# and login again. |
| 47 | + |
| 48 | +# Configure IPv6 bridge |
| 49 | + |
| 50 | + |
| 51 | +THE GATEWAY MUST BE THE IP ADDRESS GIVEN TO THE VIRTUAL BRIDGE. |
| 52 | +FORWARDING HAPPENS THANKS TO net.ipv6.conf.all.forwarding=1 |
| 53 | + |
| 54 | +# Download a debian template |
| 55 | +pveem available --section system # see whats available |
| 56 | +pveam download local debian-10-standard_10.7-1_amd64.tar.gz |
| 57 | +pveam download local alpine-3.12-default_20200823_amd64.tar.xz |
| 58 | + |
| 59 | + |
| 60 | +# DHCP |
| 61 | +# install service isc-dhcp-server |
| 62 | +apt install -y isc-dhcp-server |
| 63 | +# Enable dhcp server on boot |
| 64 | +systemctl enable isc-dhcp-server |
| 65 | + |
| 66 | +# Edit /etc/dhcp/dhcpd6.conf |
| 67 | + |
| 68 | +# Edit /etc/default/isc-dhcp-server |
| 69 | +# Uncomment out / add the following: |
| 70 | + |
| 71 | +DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf |
| 72 | +DHCPDv6_PID=/var/run/dhcpd6.pid |
| 73 | +INTERFACESv6="vmbr0" |
| 74 | + |
| 75 | +# Restart dhcp server |
| 76 | +systemctl stop isc-dhcp-server |
| 77 | +systemctl start isc-dhcp-server |
| 78 | + |
| 79 | +# Verify dhcp server is running |
| 80 | +systemctl status isc-dhcp-server |
| 81 | + |
| 82 | +# Install Router advertisement daemon radvd |
| 83 | +apt-get install -y radvd |
| 84 | +# Enable to start radvd after reboot |
| 85 | +systemctl enable radvd |
| 86 | +# Create /etc/radvd.conf |
| 87 | + |
| 88 | +interface vmbr0 { |
| 89 | + AdvSendAdvert on; |
| 90 | + MinRtrAdvInterval 3; |
| 91 | + MaxRtrAdvInterval 10; |
| 92 | + prefix <IPv6 subnet>/<subnet mask> { |
| 93 | + AdvOnLink on; |
| 94 | + AdvAutonomous on; |
| 95 | + AdvRouterAddr on; |
| 96 | + }; |
| 97 | +}; |
| 98 | + |
| 99 | +# Restart radvd |
| 100 | + |
| 101 | +systemctl restart radvd |
| 102 | +systemctl status radvd |
| 103 | + |
| 104 | + |
| 105 | +# Create container using dhcp |
| 106 | +pct create 999 --start --hostname 999 --net0 name=eth0,bridge=vmbr0,ip6=dhcp,gw6=2a01:4f8:160:2333:0:1:0:2 --memory 10240 local:vztmpl/debian-10-standard_10.7-1_amd64.tar.gz |
0 commit comments