Hi,
to prepare for my change from DSL to fibre I decided to migrate from my existing router to more powerful hardware (mini PC with N100 cpu and 6x2.5GbE). I want to run proxmox on it and use OpenWrt (maybe switch to OPNsense later) in a VM. Additional VMs shall host other services later. Since I am new to OpenWrt but run a proxmox based server for some time I am unsure, if my setup is correct/optimal.
So far I have:
- each phyical port (eth0 -5) is associated with its own virtual bridge within proxmox (vmbr0 to 5) to allow additional VMs to attach to each port as needed.
- the Openwrt VM has six NICs (virtIO), each associated with one virtual bridge that corresponds to six devices (eth0 - 5) within OpenWrt.
- a LAN bridge in OpenWrt spans eth3-5 and is assigned to interface 'lan'
- interface 'wan' is assigned to eth0 (but unused, since the fibre is not yet functional)
- the remaining devices eth1 and eth2 shall correspond to two additional interfaces/zones (dmz and dmz2) that will have additional proxmox VMs and/or external devices connected.
- WLAN will be handled by another AP in the lan network later (former router probably)
Questions/problems:
- Is OpenWrt the right way to go for this kind of setup?
- I would be glad to stay away from VLAN configurations to reduce complexity (I saw some tutorials for this). Since I have enough ports this should work, shouldn't it?
- I am a bit concerned about the nested interfaces virtual bridges - will I run into performance issues?
- How to setup DHCP server in OpenWrt to serve IPs on three different subnets (lan, dmz and dmz2)? Or is there a smarter way (e.g. assigning dedicated IP ranges to those subnets from a /24 net)?
- How do I setup routing between those subnets incl. firewalling? So far, I could not get traffic from lan to dmz or dmz2.
Thanks for any help and thoughts on this setup!
Cord
/etc/config/network:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd6b:a293:25f2::/48'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
config interface 'wan'
option device 'eth0'
option proto 'pppoe'
option ipv6 'auto'
config interface 'wan6'
option device 'eth0'
option proto 'pppoe'
option ipv6 'auto'
config device
option name 'eth5'
config device
option type 'bridge'
option name 'br-lan'
list ports 'eth3'
list ports 'eth4'
list ports 'eth5'
config device
option name 'eth4'
config device
option name 'eth1'
config device
option name 'eth3'
config device
option name 'eth0'
config device
option name 'eth2'
config interface 'dmz2'
option proto 'static'
option device 'eth2'
config interface 'dmz'
option proto 'static'
option device 'eth1'
/etc/config/firewall:
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
config zone
option name 'dmz'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'dmz'
config forwarding
option src 'dmz'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'dmz'
config zone
option name 'dmz2'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'dmz2'
config forwarding
option src 'dmz2'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'dmz2'