1
General Discussion / Re: I would like to define at least two subnets on my OPNsense LAN interface.
« on: March 02, 2022, 12:22:00 pm »
Hi, what part is not working?
If you want two subnets on your single LAN interface using the same vlan (no vlans), then you need a virtual IP to act as the second gateway. Set it as an IP address within a network i.e. with a subnet mask other than /32. e.g. 192.168.5.1/24 would mean the VIP was the gateway 192.168.5.1 on network 192.168.5.0/24
Drop the idea of two DHCP on the same vlan.
You will still need firewall rules to pass/route traffic via the VIP, i.e. your second subnet.
Something like
Interface:LAN, Source PrivateNetworks, Destination PrivateNetworks, port any, PASS
That should allow traffic in both directions between your two subnets.
If you want two subnets on your single LAN interface using the same vlan (no vlans), then you need a virtual IP to act as the second gateway. Set it as an IP address within a network i.e. with a subnet mask other than /32. e.g. 192.168.5.1/24 would mean the VIP was the gateway 192.168.5.1 on network 192.168.5.0/24
Drop the idea of two DHCP on the same vlan.
You will still need firewall rules to pass/route traffic via the VIP, i.e. your second subnet.
Something like
Interface:LAN, Source PrivateNetworks, Destination PrivateNetworks, port any, PASS
That should allow traffic in both directions between your two subnets.