Long Numbered List Randomly Changes
Documentation
-
Open the Network VLANs listing, and add a new entry for the VLAN.
Include a name, VLAN Id, subnet and usage.
Page is here: Network VLANs and Subnets
Main Switch Config
The main switch will need to be updated, so VMs in the new VLAN can reach the router.
-
Log into the main switch at: 192.168.1.20.
-
From the main switch UI, add a new VLAN entry, like this:
-
If machines in the VLAN will need to route to other machines or the internet, you will need to add the VLAN ID to the list of VLAN tags for the following switch ports:
-
Port 1 - the trunk connection to the router:
-
Port 25 - the trunk connection to the ESX host:
The above two ports allow VLAN traffic from the ESX host (25) to get routed by OpnSense (via port 1).
-
-
Make a backup of the updated switch configuration, and store it here:
\\192.168.1.211\Backups\Backups\main_switch_1930
VSphere Updates
For VMs to use the new VLAN, the ESX host will need a port group that tags any trunked traffic (heading to the router) with the new VLAN Id.
We already have a virtual switch in the ESX host, named: vs_home.
It has a physical adapter that connects to the main switch at port 25.
And, it contains all the VLAN port groups that trunk to the router.
So, we need to add a port group (to our virtual switch in the ESX) for the new VLAN.
-
Open a UI session to the ESX host at: 192.168.1.243.
-
Navigate to the Port Groups tab on the Networking page.
-
Click Add Port Group, to open the popup.
-
Give the new port group a name. Something that indicates its purpose.
-
Set the new vlanid to match what was reserved above.
-
Choose the virtual switch, vs_home, so traffic from the port group can trunk to the main switch.
-
Click OK to add the new port group for our VLAN.
VSphere
We need to confirm the new port group is accessible in VCenter.
-
Open the web UI for the VSphere instance at: 192.168.1.242.
-
Navigate to the Networking tree, for the datacenter, and verify the new port group is listed.
-
Once confirmed, we can now assign VM network adapters to the new port group.
OpnSense
Last, we need to configure the main router for the new VLAN.
This includes:
-
Adding a new VLAN, so traffic is recognized
-
Creating a virtual interface for the new VLAN
-
Adding DHCP service to the VLAN
-
Adding firewall rules for internet visibility
-
Open the main router UI at: 192.168.1.1.
Adding the New VLAN
DHCP Service
Now, we need to setup DHCP and DNS.
FirewallSome Rules
Small At this point, we have a VLAN configured across the ESX, main switch and router.We can put VMs into the new VLAN, and their network adapter (in the new port group) will receive a DHCP address, and can see other VMs in the same VLAN subnet.But, the VLAN still doesn’t route anywhere, and has no internet access.
So, we will add a few rules to allow DNS, ping, internet access, and last rule isolation.
Ping Across VLANsHeading
-
WeSoallowfar,forthemostnumberedof our VLANs to ping hosts in other subnets.Thislist isallowedworking,throughhere.
Aaparagraphfirewallwithinrulenumberedassignedlisttoentrya firewall group, named: grpLocalNets.
49. -
IfNumberedourlistnewincrements,VLAN should be allowed to do so, add it to the Firewall group called: grpLocalNets, here:This is done by clicking the edit pencil for the firewall group, and adding the subnet as a group member, by clicking the Members dropdown, and clicking the interface to include it.properly.
NOTE:Information We purposely DO NOT include some VLANs in this rule.For example: BlissProdExt and ICoreProdExt are more restrictive inCallout that theysomehow exposeskews the prodnumbered cluster, inside an isolated network.The SurfVM, ProvisioningVLAN, and BMXVMLAN are very isolated, as well, and don’t participate.But, most dev VLANs would be allowed to ping across VLANs. So, they are include as members.list...
-
OnceNot sure why theVLANnumbered list rolled back because of the above callout.
But, this numbered list entry presents a bad ordinal, but appears to occupy its correct entry, because the next one isadded as a member of grpLocalNets, click Save and Apply.correct.
DNSAnother VisibilitySmall Heading
-
MachineNumberedinlisttheentryhouse and house dev clusters use the PiHole DNS instance at 192.168.1.2.The next steps will provide visibilityappears tothehavePiHolefixedinstance from the new VLAN… if needed.itself. -
AccessStilltoworkingtheasPiHoleexpected.instance -
grantedStill
throughworkingaasfloatingexpected.firewall -
(oneStill
thatworkingcanasbeexpected.shared -
multipleStill
interfaces.working as expected.
Information Callout has skewed later numbered list entries.
-
To update the floating rule for DNS, navigate to the Floating Firewall ruleNumbered listat:isFirewallmessed/up,Rules / Floating. Identify the pihole server rule, that says: Forward DNS to PiHole.again.-
ClickContinues from theeditskewedpencil for the rule to open it.offset. -
AddContinues from thenewskewedVLAN’s interface as an interface member, by clicking the Interface dropdown and adding a checkbox to the new VLAN interface. Click Save and Apply Changes to finalize the update.offset.
NOTE:Information Not every VLAN interface is included in this DNS floating rule, like the WAN interface and ProdExt VLANs.
Standard Access External Only Rule (Common Last Rule)
For most subnets, we include a “last rule” that provides internet access, while preventing access to other VLANs. The working idea behind this last rule is that, it sits at the bottom of most subnet rule lists.It is a single rule that does two things:
Allows general internet accessPrevents access to other VLANs
OpnSense provide a means for common or shared rules for multiple interfaces (floating and group rules). But, both of those types are listed at the top of a rule list. And, we need a last rule.
So, we have to explicitly add this common last-rule to new subnets.
NOTE: We have a few subnets that are very isolated, with no internet access, such as the Provisioning VLAN or BMXVMLAN. We don’t add this last rule to them, so they get no internet access.
If the new subnet will need internet access, add the common last-rule to it by cloning it from another subnet.Navigate to a subnet thatCallout hastheskewedlast-rule,laterandnumberedclicklistthe Clone icon.Once the rule copy opens, change the Interface to the new VLAN interface.
NOTE: These network names are actually firewall aliases that are autogenerated for us.
NOTE: Be sure to select the ‘net’ source alias and not the ‘address’ source alias. The net alias is the subnet network range. And, the address alias is the gateway address alias for the subnet.entries.
- Change the Source to the network of our new VLAN.
- No other changes are required. Click Save and Apply Changes to finalize the new rule.