• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Vlan isolation

Scheduled Pinned Locked Moved Firewalling
3 Posts 3 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    guardian Rebel Alliance
    last edited by Mar 8, 2017, 8:14 PM Mar 8, 2017, 8:06 PM

    I've got a bunch of VLANS set up that are trunked into pfSense from an SG300 Switch.

    I want to keep VLAN 10, VLAN 30, VLAN 50, VLAN 60 isolated so they can only access the internet.

    Is there a better solution than creating Aliases for Each VLAN that include the networks of all the other VLANS
    (which is error prone and something could get forgotten if VLANs are added/removed) and then adding a BLOCK
    OUTGOING firewall rule to each interface that uses the block list to block all other VLANs?

    Is this the right/best approach? (See METHOD 1 Below)

    Since all VLANs are in the 192.168.0.0/16 space is there a better way to do this? (Something like METHOD 2 below)

    How would restrictive firewall rules be integrated into this method?

    If I just had a LAN, I would likely have something like:
    ALLOW SSH (With allowed hosts alias), HTTP, HTTPS, IMAP (with allowed hosts alias)
    and rely on the default block to catch anything else that shouldn't be going out.
    If I understand things correctly ALLOW VLANxx/Address would match and bypass
    the rest of the rules.  Am I correct?

    I've done a lot of Google searches, but the complexity of the extra VLANs isn't discussed or not very detailed.

    Any assistance would be much appreciated.

    METHOD 1-USING ALIASES```
    ISOLATE10
    192.168.20.1/24
    192.168.30.1/24
    192.168.40.1/24
    192.168.50.1/24
    192.168.60.1/24

    ISOLATE30
    192.168.10.1/24
    192.168.20.1/24
    192.168.40.1/24
    192.168.50.1/24
    192.168.60.1/24

    ISOLATE50
    192.168.10.1/24
    192.168.20.1/24
    192.168.30.1/24
    192.168.40.1/24
    192.168.60.1/24

    ISOLATE60
    192.168.10.1/24
    192.168.20.1/24
    192.168.30.1/24
    192.168.40.1/24
    192.168.50.1/24

    
    **BLOCK OUTGOING firewall rules:** (Not using/Don't really want IPv6, that's why block rules include it, but pass rules don't)```
    Firewall / Rules / VLAN10
    	Protocol	Source	Port	Destination	Port	Description
    BLOCK	IPv4+6 *	*	*	ISOLATE10	*	Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)
    
    Firewall / Rules / VLAN30
    	Protocol	Source	Port	Destination	Port	Description
    BLOCK	IPv4+6 *	*	*	ISOLATE30	*	Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)
    
    Firewall / Rules / VLAN50
    	Protocol	Source	Port	Destination	Port	Description
    BLOCK	IPv4+6 *	*	*	ISOLATE50	*	Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)
    
    Firewall / Rules / VLAN60
    	Protocol	Source	Port	Destination	Port	Description
    BLOCK	IPv4+6 *	*	*	ISOLATE60	*	Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)
    

    METHOD 2-Block 192.168.0.0/16 and Allow VLANxx/Address```
    Firewall / Rules / VLAN10
    Protocol Source Port Destination Port Description
    ALLOW IPv4  * * * VLAN10/Address * Allow Access to Internet
    BLOCK IPv4+6 * * * 192.168.0.0/16 * Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)

    Firewall / Rules / VLAN30
    Protocol Source Port Destination Port Description
    ALLOW IPv4  * * * VLAN30/Address * Allow Access to Internet
    BLOCK IPv4+6 * * * 192.168.0.0/16 * Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)

    Firewall / Rules / VLAN50
    Protocol Source Port Destination Port Description
    ALLOW IPv4  * * * VLAN50/Address * Allow Access to Internet
    BLOCK IPv4+6 * * * 192.168.0.0/16 * Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)

    Firewall / Rules / VLAN60
    Protocol Source Port Destination Port Description
    ALLOW IPv4  * * * VLAN60/Address * Allow Access to Internet
    BLOCK IPv4+6 * * * 192.168.0.0/16 * Block Access to other VLANS
    (Balance of Allow/Block Firewall rules for this interface)

    If you find my post useful, please give it a thumbs up!
    pfSense 2.7.2-RELEASE

    1 Reply Last reply Reply Quote 0
    • M
      moikerz
      last edited by Mar 8, 2017, 10:15 PM

      Just make an alias for 192.168.0.0/16 and block that.

      I usually make an alias for "AllInternalNetworks" as:

      • 192.168.0.0/16
      • 172.16.0.0/12
      • 10.0.0.0/8
        then block all access to those, and explicitly allow access to the specific IPs/addresses/networks above that line.

      Example:
      (top line) allow "LAN net" access to "LAN address" (LAN can access gateway)
      (next line) block "LAN net" to "AllInternalNetworks" (LAN can't go to any internal network)
      (next line) allow "LAN net" access to * (LAN can access internet)

      1 Reply Last reply Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator
        last edited by Mar 8, 2017, 10:36 PM

        yup I call that alias rfc1918.. I then use !rfc1918 rule to allow only access to internet and non of my other networks.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received