Quote from: luckylinux on May 23, 2024, 09:40:08 amGateway fe80::1 would NOT work in OPNSense. I guess that's because Routing (of Subnet) is required.It definitely does. An IPv6 interface will always have a link local address in addition to the global unicast address you assigned. So it can use another link local address on the same interface just fine.See attached screenshots. This is OPNsense on bare metal, though.
Gateway fe80::1 would NOT work in OPNSense. I guess that's because Routing (of Subnet) is required.
2a01:XXXX:XXXX:XXXX:1::10/96fe80::YYYY:YYYY:YYYY:YYYY/64
# ICMP Tracerouteroot@OPNSense:/ # traceroute6 -I 2001:4860:4860::8888traceroute6 to 2001:4860:4860::8888 (2001:4860:4860::8888) from 2a01:XXXX:XXXX:XXXX:1::10, 64 hops max, 20 byte packets 1 2a01:XXXX:XXXX:XXXX:1::1 0.149 ms * 0.211 ms 2 2a01:XXXX::XXXX:XXXX:b 0.365 ms 2.220 ms 0.287 ms 3 2a01:XXXX:0:XXXX::XXXX 0.571 ms 0.474 ms 0.341 ms 4 2a01:XXXX:0:XXXX::XXXX 4.964 ms 4.898 ms 4.898 ms 5 2001:4860:1:1::1a4 5.157 ms 5.038 ms 5.094 ms 6 2a00:1450:8155::1 5.205 ms 5.219 ms 5.211 ms 7 dns.google 5.204 ms 5.189 ms 5.201 ms# UDP Tracerouteroot@OPNSense:/ # traceroute6 -U -p 33434 2001:4860:4860::8888traceroute6 to 2001:4860:4860::8888 (2001:4860:4860::8888) from 2a01:XXXX:XXXX:XXXX:1::10, 64 hops max, 28 byte packets 1 2a01:XXXX:XXXX:XXXX:1::1 0.135 ms * * 2 2a01:XXXX::XXXX:XXXX:b 0.457 ms 0.326 ms 0.304 ms 3 coreXXX.XXXX.hetzner.com 11.941 ms 0.622 ms 2a01:XXXX:XXXX:XXXX::XXXX 0.497 ms 4 coreXXX.XXXX.hetzner.com 4.958 ms 2a01:XXXX:XXXX:XXXX::XXXX 5.180 ms 2a01:XXXX:XXXX:XXXX::XXXX 5.102 ms 5 2001:4860:1:1::19c8 4.948 ms 2001:4860:1:1::624 6.293 ms 2001:4860:1:1::19c8 5.235 ms 6 2a00:1450:8037::1 5.239 ms 2a00:1450:8057::1 6.570 ms 2a00:1450:8463::1 5.356 ms 7 dns.google 5.270 ms 5.112 ms 5.248 ms# TCP Traceroute gets Lost sometimes once it gets out of Hetzner Datacenter I guessroot@OPNSense:/ # traceroute6 -T 2001:4860:4860::8888traceroute6 to 2001:4860:4860::8888 (2001:4860:4860::8888) from 2a01:XXXX:XXXX:XXXX:1::10, 64 hops max, 20 byte packets 1 2a01:XXXX:XXXX:XXXX:1::1 0.158 ms * 0.250 ms 2 2a01:XXXX::XXXX:XXXX:b 0.364 ms 2.267 ms 0.339 ms 3 2a01:XXXX:XXXX:XXXX::XXXX 0.577 ms 0.495 ms coreXX.XXX.hetzner.com 0.453 ms 4 coreXX.XXX.hetzner.com 5.096 ms 4.982 ms 5.170 ms 5 * 2001:4860:1:1::19c8 5.257 ms * 6 * * * 7 * * *
root@Proxmox:~# traceroute6 -T -p 443 2001:4860:4860::8888traceroute to 2001:4860:4860::8888 (2001:4860:4860::8888), 30 hops max, 68 byte packets 1 2a01:XXXX::XXXX:XXXX:b (2a01:XXXX::XXXX:XXXX:b) 0.401 ms 0.398 ms * 2 * * coreXX.XXX.hetzner.com (2a01:XXXX:XXXX:XXXX::XXXX) 0.395 ms 3 coreXX.XXX.hetzner.com (2a01:XXXX:XXXX:XXXX::XXXX) 4.840 ms * * 4 * * * 5 * * 2a00:1450:814d::1 (2a00:1450:814d::1) 4.912 ms 6 dns.google (2001:4860:4860::8888) 5.331 ms * *
When you spoof MAC addresses the interface is set to promiscuous mode which means you will see all traffic on that particular network destined at broadcast or multicast addresses or ones where the switch has not yet learned the correct port.Why are you trying to force a virtualised firewall setup into an environment that is clearly not designed for that?
bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096
Private LAN Virtual Switch ┏━━━━┓ ┏━━━━━━━━━━━━━━━━┓ ┌────┐ ┃ ┃ ┃ OPNsense ┃ │ │ ┃ ┃ 10G ┃ (EX 44) ┃ 1G │ │ ┃ ┣━━━━━━━━━━━━━┃ ┃─────────────┤ │ ┃ ┃ ┃ HAproxy ┃ │ │ ┃ ┃ ┗━━━━━━━━━━━━━━━━┛ │ │ ┃ ┃ ┃ │ │ ┃ ┃ ┃ │ │ Uplink Public Services ┃ ┃ HA-Sync ┃ 1G │ │━━━━━━━━━━━━━━━━━━▶ ◀════════════════════ ┃ ┃ ┃ │ │ Public IP ┃ ┃ ┃ │ │ ┃ ┃ ┏━━━━━━━━━━━━━━━━┓ │ │ ┃ ┃ ┃ OPNsense ┃ │ │ ┃ ┃ 10G ┃ (EX 44) ┃ 1G │ │ ┃ ┣━━━━━━━━━━━━━┃ ┃─────────────┤ │ ┃ ┃ ┃ HAproxy ┃ │ │ ┃ ┃ ┗━━━━━━━━━━━━━━━━┛ └────┘ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┏━━━━━━━━━━━━━━━━┓ ┃ ┃ 10G ┃ proServer Host ┃ ┃ ┣━━━━━━━━━━━━━┫ (AX 102) ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┌────┐ ┃ ┃ ┃━ ━ ━ ━ ━ ━ ━┃━│Jail│───────▶ ┃ ┃ ┃ ┃ └────┘ Mgmt ┃ ┃ ┃ ┃ ┌────┐ ┃ Uplink ┃ ┃━ ━ ━ ━ ━ ━ ━┃━│Jail│───────▶ ┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━▶ ┃ ┃ ┃ └────┘ Mgmt ┃ Management only ┃ ┃ ┃ ┌────┐ ┃ ┃ ┃━ ━ ━ ━ ━ ━ ━┃━│Jail│───────▶ ┃ ┃ ┃ ┃ └────┘ Mgmt ┃ ┃ ┃ ┃ ... ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━┛ ┃ ┃ ┏━━━━━━━━━━━━━━━━┓ ┃ ┃ 10G ┃ proServer Host ┃ ┃ ┣━━━━━━━━━━━━━┫ (AX 102) ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┌────┐ ┃ ┃ ┃━ ━ ━ ━ ━ ━ ━┃━│Jail│───────▶ ┃ ┃ ┃ ┃ └────┘ Mgmt ┃ ┃ ┃ ┃ ┌────┐ ┃ Uplink ┃ ┃━ ━ ━ ━ ━ ━ ━┃━│Jail│───────▶ ┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━▶ ┃ ┃ ┃ └────┘ Mgmt ┃ Management only ┃ ┃ ┃ ┌────┐ ┃ ┃ ┃━ ━ ━ ━ ━ ━ ━┃━│Jail│───────▶ ┃ ┃ ┃ ┃ └────┘ Mgmt ┃ ┃ ┃ ┃ ... ┃ ┃ ┃ ┃ ┃ ┗━━━━┛ ┗━━━━━━━━━━━━━━━━┛ ...
Why do you say that ("environment that is clearly not designed for that") ?
I have dedicated OPNsense hosts at Hetzner and private LAN connections to the equally dedicated web server hosts. But that might be overkill in your case.When you order an additional private network interface you cannot connect that to the Internet as far as I know. Only to other equally private infrastructure.I see another "proper" way out of your dilemma - routed setup. We do this for all our web servers at Hetzner. I assume (I don't use Proxmox) that Proxmox can create an internal bridge not connected to any physical interface that can serve as the uplink for VMs? Correct?I also assume that Proxmox acts as a router for both IPv4 and IPv6.So on the external Proxmox interface:- configure the single IPv4 address you ordered with your server- configure the IPv4 default gateway- configure one IPv6 address from that /64 you got with your server, but with a /128 prefix length. E.g. dead:beef:dead:beef::1/128- configure the IPv6 default gateway: fe80::1You should be able to ping the Proxmox host via IPv4 and IPv6 from outside.Now you would need to order at least one additional IPv4 /29 from Hetzner to have IPv4 for your VMs.Let's assume it's 8.16.32.64/29.- assign the first (or last, or any ...) address to that internal bridge, e.g. 8.16.32.65/29- you can now use 8.16.32.66-70 as IP addresses for VMs connected to that bridge. 8.16.32.65 would be their default gateway- now assign another address from your /64 to that same bridge, but with the correct /64 prefix length, e.g. dead:beef:dead:beef::2/64. This is the default gateway for your VMs for IPv6.The VMs connected to that bridge should be reachable on their public IPv4 and IPv6 addresses that way.We have >20 hosts setup exactly in that fashion, only that our "VMs" are in fact FreeBSD jails and the hosts are not Proxmox but plain FreeBSD.HTH,Patrick
But your solution would not work with single additional IP, correct, since you need 1 IP of each Subnet for Gateway and 1 IP for Broadcast, right ?
The other alternative, as suggested previously, would be to pass ALL Traffic to the OPNSense VM using the existing NIC. And then access the Proxmox VE Host from there ... But again, if OPNSense VM breaks down ...
Quote from: luckylinux on May 23, 2024, 11:53:29 amBut your solution would not work with single additional IP, correct, since you need 1 IP of each Subnet for Gateway and 1 IP for Broadcast, right ?Correct. 5 possible VMs with public IPv4, if you order a /29.Quote from: luckylinux on May 23, 2024, 11:53:29 amThe other alternative, as suggested previously, would be to pass ALL Traffic to the OPNSense VM using the existing NIC. And then access the Proxmox VE Host from there ... But again, if OPNSense VM breaks down ...At least you can get a remote KVM for up to three hours for free if available. Works pretty well. I don't know if you can fix a broken Proxmox/OPNsense setup that way, but I would guess so.
Now you are leaving my area of expertise because I have no idea how these vmbr things work exactly.I always aim for a clean network setup even if more expensive, but then I work in a professional/enterprise context. We just order all hosts with a /29 by default and calculate that in.
Hey got same Problem with 3 IP's and Same Gateway, got ist solved.You need seperate MAC for every IP and set it to the seperate Interface in Proxmox VM Conf for Opnsense.Interfaces conf file add to Main vmbr0 with Main-IP up ip route add WAN2-IP dev vmbr0 up ip route add WAN3-IP dev vmbr0In Opnsense create Interfaces and set IP4 on DHCP then you are able to get same Gateway for Multiple Wan Interfaces. What a Heck :-)Try and Error multiple Times and a lot of Beer :-)Hope it helps you.
auto loiface lo inet loopback#auto eth0iface eth0 inet manualauto vmbr0iface vmbr0 inet static hwaddress XX:XX:XX:XX:XX:XX address XXX.XXX.XXX.proxmox netmask 255.255.255.192 gateway XXX.XXX.XXX.hetznergateway bridge-ports eth0 bridge-stp off bridge_waitport 0 bridge-fd 0 bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096 pre-up ip addr flush dev eth0 post-up ip addr flush dev eth0iface vmbr0 inet6 static hwaddress XX:XX:XX:XX:XX:XX # First Address of the Main /64 Subnet address 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 netmask 128 gateway fe80::1 bridge-mcsnoop no bridge-stp off bridge_waitport 0 bridge-fd 0 bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096 pre-up ip addr flush dev eth0 post-up ip addr flush dev eth0 up ip -6 route add fe80::1 dev vmbr0 up ip -6 route add default via fe80::1 dev vmbr0 down ip -6 route del default via fe80::1 dev vmbr0 down ip -6 route del fe80::1 dev vmbr0auto vmbr1iface vmbr1 inet static address 0.0.0.0 netmask 255.255.255.255 bridge_ports none bridge_stp off bridge_waitport 0 bridge_fd 0 bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096iface vmbr1 inet6 static # First Address of the separate :0001 /80 Subnet of the Main /64 Subnet address 2a01:XXXX:XXXX:XXXX:0001:0000:0000:0001 netmask 80 bridge_stp off bridge_waitport 0 bridge_fd 0 bridge-mcsnoop no bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096 up ip -6 route add 2a01:XXXX:XXXX:XXXX:0000::1/128 via 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 metric 0 down ip -6 route del 2a01:XXXX:XXXX:XXXX:0000::1/128 via 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 metric 0 up ip -6 route add 2a01:XXXX:XXXX:XXXX:0001::/80 via 2a01:XXXX:XXXX:XXXX:0001:0000:0000:0001 dev vmbr1 metric 256 down ip -6 route del 2a01:XXXX:XXXX:XXXX:0001::/80 via 2a01:XXXX:XXXX:XXXX:0001:0000:0000:0001 dev vmbr1 metric 256 up ip -6 route add 2a01:XXXX:XXXX:XXXX::/64 via 2a01:XXXX:XXXX:XXXX:0001:0000:0000:0010 dev vmbr1 metric 500 down ip -6 route del 2a01:XXXX:XXXX:XXXX::/64 via 2a01:XXXX:XXXX:XXXX:0001:0000:0000:0010 dev vmbr1 metric 500 up ip -6 route add default via 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 metric 800 down ip -6 route del default via 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 metric 800auto vmbr2iface vmbr2 inet static address 0.0.0.0 netmask 255.255.255.255 bridge_ports none bridge_stp off bridge_waitport 0 bridge_fd 0 bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096iface vmbr2 inet6 static # First Address of the separate :0000 /64 Subnet of the Additional /56 Subnet address 2a01:XXXX:XXXX:YYYY:0000:0000:0000:0001 netmask 64 bridge_stp off bridge_waitport 0 bridge_fd 0 bridge-mcsnoop no bridge-disable-mac-learning 1 bridge-unicast-flood off bridge-multicast-flood off bridge-vlan-aware yes bridge-vids 2-4096 up ip -6 route add 2a01:XXXX:XXXX:YYYY::/64 via 2a01:XXXX:XXXX:YYYY:0000:0000:0000:0001 dev vmbr2 metric 256 down ip -6 route del 2a01:XXXX:XXXX:YYYY::/64 via 2a01:XXXX:XXXX:YYYY:0000:0000:0000:0001 dev vmbr2 metric 256 up ip -6 route add 2a01:XXXX:XXXX:YYYY::/56 via 2a01:XXXX:XXXX:YYYY:0000:0000:0000:0010 dev vmbr2 metric 500 down ip -6 route del 2a01:XXXX:XXXX:YYYY::/56 via 2a01:XXXX:XXXX:YYYY:0000:0000:0000:0010 dev vmbr2 metric 500 up ip -6 route add default via 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 metric 800 down ip -6 route del default via 2a01:XXXX:XXXX:XXXX:0000:0000:0000:0001 metric 800