Skip to content

Instantly share code, notes, and snippets.

@exiguus
Last active July 16, 2020 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exiguus/00c34208d87d1d9a9d68b09ef77b8d9d to your computer and use it in GitHub Desktop.
Save exiguus/00c34208d87d1d9a9d68b09ef77b8d9d to your computer and use it in GitHub Desktop.
Proxmox Setup Host (bridge) intern/public (nat pfsense/non-host route)

Proxmox bridged Setup

Bridge Setup with additional (virtual) Guest IPs

  1. Proxmox host Debian
  • HOST proxmox
  • IP 1.0.0.23/24
  • Gateway IP 1.0.0.1
  1. Proxmox Guest pfSense (public)
  • HOST pfsense-public
  • IP 2.0.0.21/32
  • Gateway IP 1.0.0.1
  1. Proxmox Guest Debian (public)
  • HOST debian-public
  • IP 2.0.0.22/32
  • Gateway IP 1.0.0.1
  1. Proxmox Guest OpenBSD (public)
  • HOST openbsd-public
  • IP 2.0.0.23/32
  • Gateway IP 1.0.0.1

proxmox

# proxmox:/etc/network/interfaces
# Proxmox Host `proxmox`
#   1.0.0.23Debian/10 public guest with routed gateway is the guest public ip
#   1.0.0.1 is the host gateway ip

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback

# bridge public
# connected:
#   - debian-public (2.0.0.22)
#   - openbsd-public (2.0.0.23)
auto vmbr0
iface vmbr0 inet static
	address 1.0.0.23/24
	gateway 1.0.0.1
	bridge-ports eth0
	bridge-stp off
	bridge-fd 0
	pointopoint 1.0.0.1

# bridge intern
# connected
#   - pfsense-public (2.0.0.21)
auto vmbr1
iface vmbr1 inet manual
	bridge-ports none
	bridge-stp off
	bridge-fd 0

pfsense Config pfsense-public

-> interfaces -> wan

IPv4 -> 2.0.0.21/32 IPv4 Upstream gateway -> 1.0.0.1

-> interfaces -> lan

IPv4 -> 192.168.1.1/24 IPv4 Upstream gateway -> none

-> interfaces -> asignment

WAN -> vtnet0 LAN -> vtnet1

-> system -> advance -> networking

  • Hardware Checksum Offloading [X] Disable hardware checksum offload
  • Hardware TCP Segmentation Offloading [X] Disable hardware TCP segmentation offload
  • Hardware Large Receive Offloading [X] Disable hardware large receive offload

Interface Config

# pfsense-public:/etc/hostname.vio0
# Proxmox Guest pfsense (public) `pfsense-public`
#   2.0.0.21 is the guest public ip
#   1.0.0.1 is the host gateway ip

inet 2.0.0.21 255.255.255.255 
!sleep 2
!route add -inet 1.0.0.1/32 -link -iface vio0
!route add -inet default 1.0.0.1

debian-public

# debian-public:/etc/network/interfaces
# Proxmox Guest Debian (public) `debian-public`
#   2.0.0.22 is the guest public ip
#   1.0.0.1 is the host gateway ip

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# you need to avoid a broadcast address with post-up
auto eth0
iface eth0 inet static
	address 2.0.0.22/32
	post-up ip addr flush dev eth0;\
		ip address add 2.0.0.22/32 dev eth0;\
		ip route add 1.0.0.1 dev eth0;\
		ip route add default via 1.0.0.1

openbsd-public

# openbsd-public:/etc/hostname.vio0
# Proxmox Guest OpenBSD (public) `openbsd-public`
#   2.0.0.23 is the guest public ip
#   1.0.0.1 is the host gateway ip

inet 2.0.0.23 255.255.255.255 
!sleep 2
!route add -inet 1.0.0.1/32 -link -iface vio0
!route add -inet default 1.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment