Resume
Use Case: Build a virtual Nethserver as gateway on top of a Proxmox-System
Reason for this use case: primarily to use the flexibility of virtual machines, especially backup, snapshots for better disaster management and faster recovery of entire network servers
Initial situation :
- Internet-/DSL-Router:
192.168.2.1/24
- currently connected via switch to my dedicated Nethserver on Server 1
-
later planned to connect to
enp2s0
of my Server 2 (Promox)
-
Server 1 : dedicated NS-Gateway
192.168.3.1/24
(GREEN/LAN) with DHCP and DNS +192.168.2.5
(RED/WAN)
Server 1 shout be substituted by Server 2 with Promox and a virtualised Nethserver as Gateway -
all Clients (Diskstation, Workstations, Laptops, Mobile Phones…),connected via switch with Server 1 (dedicated NS):
192.168.3.2-192.168.3.254
) - for Installation purposes Server 2 (Promox) with enps20 (not connected) and
enp3s0
connected via switch to the gateway. This server is pingable from other clients and has internet connection.
My planned Architecture :
- Internet-/DSL-Router:
192.168.2.1
- connected to enp2s0 of my Server 2 (Promox)
- connection to Server 1 disconnected
- Server 2 :
- enps2s0 with
192.168.2.2
connected to my DSL-Router - enp3s0 connected to my switch (LAN-side)
- virtual NS-Gateway with DHCP and DNS
- all Clients (Diskstation, Workstations, Laptops, Mobile Phones…),connected via switch with Server 1 (dedicated NS): 192.168.3.2-192.168.3.254)
- Server 2 (Promox) with
enps20
(connected to DSl-Router) andenp3s0
(connected to the switch).
Installation of Proxmox:
- Connect the server with one NIC
enp3s0
to the switch - Install the Proxmox-Server with a static IP inside the LAN-IP-Range
- modify the apt sources
nano /etc/apt/sources.list.d/pve-enterprise.list
and disable the source
# deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
- modify the apt sources again
nano /etc/apt/sources.list
by adding
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription - update the Proxmox server
apt update & apt full-upgrade
- install ifupdown2 to avoid reboots in case of network changes:
apt install ifupdown2
reboot
Ensure a well defined NIC configuration
root@proxmox:~# nano /etc/network/interfaces
auto lo
iface lo inet loopback
auto enp3s0
iface enp3s0 inet manual
#Connected to Switch
auto enp2s0
iface enp2s0 inet manual
#disconnected: planned to DSL router
auto vmbr0
iface vmbr0 inet static
address 192.168.3.200
netmask 255.255.255.0
gateway 192.168.3.1
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet manual
bridge-ports enp2s0
bridge-stp off
bridge-fd 0
root@proxmox:~# reboot
Ensure the right configuration inside the Proxmox-GUI
Installation of Nethserver inside a new created VM
-
Install a new VM
-
Install Nethserver
-
install QEMU-Guest-Agent:
yum install qemu-guest-agent
-
Update the Nethserver
-
Configure the Network inside Nethserver
before:
after:
-
Connect the LAN cable from
enp2s0
to the router and disconnect the old Server 1 (dedicated Nethserver) if relevant -
Activate DHCP on
eth1
-
have fun