Hi,
I’m a beginner in networking, learning a lot everyday and I have managed to split my network into multiple VLANs on a RB5009 alone with ether1 to ether7 in a single bridge, ether8 being used as an emergency interface kept out of the bridge in case I mess things up.
The vlans are :
VLAN42 : management (192.168.42.0/24)
VLAN100 : trusted (192.168.100.0/24)
VLAN200 : untrusted (192.168.200.0/24)
Things seem to be working fine, I have separated VLANs through firewall rules yet I am still able to ping any machine… or am I ?
Now I want to add my Proxmox host, a single NIC intel NUC on which I have set its network configuration like so :
iface eno1 inet manual
auto vmbr0.42
iface vmbr0.42 inet static
address 192.168.42.5/24
gateway 192.168.42.1
auto vmbr0
iface vmbr0 inet static
bridge-ports eno1
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
This configuration works, I can now connect on the proxmox host from my VLAN100 machines.
BUT now I can’t ping 192.168.100.10 (my workstation) from 192.168.42.5.
I have so many questions, but first :
- Why do I see the ping coming on ether1 with src 192.168.42.5 (VLAN100)
- Is a hybrid port (which I’m trying to do with ether6 here) the right solution for me to be able to set Proxmox host in VLAN42 and later set Proxmox guests in VLAN500 ?
Ultimately what I want is Proxmox host on VLAN42, Proxmox guests on VLAN500, but when then I’m confused because I don’t understand why Proxmox doesn’t receive ping response from 192.168.100.10 even though it’s not blocked by the firewall and now I’m not sure I understood anything.
Here is the relevant RB5009 config
# 2023-12-08 14:12:56 by RouterOS 7.12.1
# software id = 8RFV-15RQ
#
# model = RB5009UG+S+
/interface bridge
add admin-mac=xx:xx:xx:xx:xx:xx auto-mac=no name=br-wan
add admin-mac=xx:xx:xx:xx:xx:xx auto-mac=no comment=defconf name=bridge \
protocol-mode=none vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] comment="Workstation"
set [ find default-name=ether6 ] comment="Proxmox"
set [ find default-name=sfp-sfpplus1 ] auto-negotiation=no speed=2.5G-baseT
/interface vlan
add interface=bridge name=vlan42-management vlan-id=42
add interface=bridge name=vlan100-trusted vlan-id=100
add interface=bridge name=vlan200-untrusted vlan-id=200
/interface list
add name=WAN
add name=LAN
add name=TRUSTED
add name=VLAN
/ip pool
add name=pool_lan ranges=192.168.10.10-192.168.10.254
add name=pool_vlan42-management ranges=192.168.42.10-192.168.42.254
add name=pool_vlan100-trusted ranges=192.168.100.10-192.168.100.254
add name=pool_vlan200-untrusted ranges=192.168.200.10-192.168.200.254
/ip dhcp-server
add address-pool=pool_vlan100-trusted interface=vlan100-trusted name=\
dhcp-vlan100
add address-pool=pool_vlan200-untrusted interface=vlan200-untrusted name=\
dhcp-vlan200
add address-pool=pool_vlan42-management interface=vlan42-management name=\
dhcp-vlan42
/interface bridge filter
add action=set-priority chain=output dst-port=67 ip-protocol=udp log=yes \
log-prefix="Set CoS6 on DHCP request" mac-protocol=ip new-priority=6 \
out-interface=vlan832-internet passthrough=yes
/interface bridge port
add bridge=bridge frame-types=admit-only-vlan-tagged interface=ether6 pvid=42
add bridge=bridge frame-types=admit-only-untagged-and-priority-tagged interface=ether1 pvid=100
add bridge=bridge frame-types=admit-only-untagged-and-priority-tagged interface=ether7 pvid=200
/interface bridge vlan
add bridge=bridge tagged=bridge,ether6 vlan-ids=42
add bridge=bridge tagged=bridge vlan-ids=100
add bridge=bridge tagged=bridge vlan-ids=200
/interface list member
add interface=vlan42-management list=VLAN
add interface=vlan100-trusted list=VLAN
add interface=vlan200-untrusted list=VLAN
add interface=vlan100-trusted list=TRUSTED
/ip address
add address=192.168.42.1/24 interface=vlan42-management network=192.168.42.0
add address=192.168.100.1/24 interface=vlan100-trusted network=192.168.100.0
add address=192.168.200.1/24 interface=vlan200-untrusted network=192.168.200.0
/ip dhcp-server lease
add address=192.168.200.10 client-id=1:xx:xx:xx:xx:xx:xx mac-address=xx:xx:xx:xx:xx:xx server=dhcp-vlan200
add address=192.168.100.10 client-id=1:xx:xx:xx:xx:xx:xx mac-address=xx:xx:xx:xx:xx:xx server=dhcp-vlan100
/ip dhcp-server network
add address=192.168.42.0/24 gateway=192.168.42.1
add address=192.168.100.0/24 gateway=192.168.100.1
add address=192.168.200.0/24 gateway=192.168.200.1
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid log-prefix=invalid
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1 \
log=yes log-prefix="local loopback"
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
disabled=yes in-interface-list=!LAN log-prefix=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid log-prefix=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN log=yes log-prefix=\
"WAN !dstnat"
add action=jump chain=input comment="ICMP jumps" jump-target=ICMP log-prefix=\
ping protocol=icmp
add action=jump chain=forward jump-target=ICMP log=yes log-prefix=ping \
protocol=icmp
add action=add-src-to-address-list address-list=syn_flooders \
address-list-timeout=30m chain=input comment="SYN flood" \
connection-limit=30,32 protocol=tcp tcp-flags=syn
add action=drop chain=input log=yes log-prefix="syn flood" src-address-list=\
syn_flooders
add action=add-src-to-address-list address-list=port_scanners \
address-list-timeout=1w chain=input comment="Port scan" protocol=tcp psd=\
21,3s,3,1
add action=drop chain=input log=yes log-prefix="port scan" src-address-list=\
port_scanners
add action=accept chain=input comment="Router access" in-interface=ether8 \
src-address-list=emergency
add action=accept chain=input in-interface=vlan100-trusted
add action=drop chain=input disabled=yes dst-port=8291 in-interface-list=\
!TRUSTED log=yes log-prefix="block winbox" protocol=tcp
add action=drop chain=forward comment="Drop to bogon list" dst-address-list=\
bogons log=yes log-prefix=bogon
add action=add-src-to-address-list address-list=spammers \
address-list-timeout=3h chain=forward comment=Spammers connection-limit=\
30,32 dst-port=25,587 limit=30/1m,0:packet protocol=tcp
add action=drop chain=forward dst-port=25,587 log=yes log-prefix=spammers \
protocol=tcp src-address-list=spammers
add action=accept chain=input comment="Allow DNS requests from VLAN" \
dst-port=53 in-interface-list=VLAN log-prefix=DNS protocol=udp
add action=accept chain=forward comment=\
"Trusted machines can access all VLANs" in-interface-list=TRUSTED \
out-interface-list=VLAN
add action=accept chain=forward comment="EMERGENCY internet" disabled=yes \
in-interface-list=TRUSTED out-interface-list=WAN
add action=accept chain=forward comment="TEMP MGMT TO TRUSTED" in-interface=\
vlan42-management out-interface=vlan100-trusted
add action=accept chain=forward comment="VLAN internet" connection-state=new \
in-interface-list=VLAN out-interface-list=WAN
add action=drop chain=input comment="Drop everything else # BE CAREFUL HERE" \
log-prefix="drop everything else"
add action=drop chain=forward log-prefix=drop
add action=accept chain=ICMP comment="ICMP allowed / dropped messages" \
icmp-options=8:0 limit=1,5:packet log-prefix="echo request" protocol=icmp
add action=accept chain=ICMP icmp-options=0:0 protocol=icmp
add action=accept chain=ICMP icmp-options=11:0 protocol=icmp
add action=accept chain=ICMP icmp-options=3:0-1 protocol=icmp
add action=accept chain=ICMP icmp-options=3:4 protocol=icmp
add action=accept chain=ICMP icmp-options=11:0 protocol=icmp
add action=accept chain=ICMP icmp-options=12:0 protocol=icmp
add action=drop chain=ICMP log-prefix="drop other ICMPs" protocol=icmp
add action=jump chain=output jump-target=ICMP log-prefix="icmp out" protocol=\
icmp
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
