04 เมษายน 2566

proxmox anywhere with mikrotik chr

Scenario
- mini pc with 1 NIC
- proxmox CE
- mikrotik CHR
- cloudflare tunnel

1. Install proxmox with static ip for existing network (192.168.80.20/24)

Network Device :  enp1s0
Linux Bridge : vmbr0

/etc/network/interfaces
iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.80.20/24
        gateway 192.168.80.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0

2. Add vmbr1 as LAN (10.80.0.20/24) and set vmbr0 as WAN

/etc/network/interfaces
iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.80.20/24
        gateway 192.168.80.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0
#WAN

auto vmbr1
iface vmbr1 inet static
        address 10.80.0.20/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
#LAN

3. Install Mikrotik CHR

ether1 : vmbr0 (dhcp client)
ehter2 : vmbr1 (10.80.0.1/24)
masquerade out-interface ether1

4. Install cloudflare tunnel via proxmox node shell

Add public hostname with service https://10.80.0.20:8006 for proxmox
Add public hostname with service http://10.80.0.1 for mikrotik CHR

5. change promox default gateway to vmbr1

/etc/network/interfaces
iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.80.20/24
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0
#WAN

auto vmbr1
iface vmbr1 inet static
        address 10.80.0.20/24
        gateway 10.80.0.1
        bridge-ports none
        bridge-stp off
        bridge-fd 0
#LAN

6. Access proxmox with public hostname

7. Install other proxmox guest with vmbr1 and access with public hostname