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

Help with Vlan

Scheduled Pinned Locked Moved Routing and Multi WAN
25 Posts 3 Posters 4.9k 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.
  • J
    Jamerson
    last edited by Nov 28, 2015, 2:37 PM Nov 28, 2015, 2:02 PM

    @johnpoz:

    Do you have switch that supports vlans?  Does your AP support vlans?

    Yes you can lots and lots of vlans on same nic, but if you don't have the switch and or AP that supports them its not going to do you any good.  Once you create a vlan they will have their own firewall rules..

    Yes the Switch is a VLAN compatible , the AP's are linksys wap300n.
    I can't see anywhere if the linksys wap300n is a VLAN compatible or not .

    whenever it configured, I want to block the connections between the VLANS,
    when a user is connected on VLAN20, he should see users on the VLAN 30

    so I wanna create a alias " VLAN 30 " and type is Network and add VLANS 10 and 20 on the network FQDN,
    and the same for ALIAS " VLAN 20 " and type is network and Add VLANS 10 and 30 on the network FQDN.

    on each VLANS Interface firewall rules I wanna create a firewall rules .

    Firewall rules on VLANS 20 interface :
    Action is Pass
    Interface is VLAN20
    TCP IP4
    Protocol TCP
    Source VLAN net20

    Destination Not to Type =single host or Aliase and Adress VLAN20.

    and do the same on VLAN30 interface.

    is this the correct way of blocking the VLANS ?

    Thank you

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Nov 28, 2015, 2:58 PM

      so your switch supports vlans, but your AP does not.. So this means you can not have different SSIDs with different vlans..  But yeah you can connect the AP to a different vlan than your normal wired network.

      As to the rules you put on the vlans..  They will be their own network, not sure what your all up about aliases for?  But sure you can use those to limit, see the wlan_guest is locked down to not talk to anything else on my network, not even pfsense addresses.  They get handed off a public dns via dhcp.

      So for example here is my wlan, which is just one of the vlans on my wifi network.. This one is the most open since you have to use eap-tls to auth to it, etc..

      So I let me ipad do whatever it wants and go wherever it wants.
      I then allow ping to the wlan pfsense address via ipv4 or 6
      I then allow these devices to use my ntp server that is on my lan network.
      I allow ipv4 and 6 to use dns on pfsense wlan address.  I allow my AP to talk to freeradius running pfsense wlan address both auth and accounting.
      I then block access to any other pfsense IP address from ipv4 or ipv6
      I then allow ipv4 or ipv6 from wlan to go to anywhere else they want other than my LAN network.. For example they can talk to the dmz, they can talk to the other wlan vlans, etc..

      As you notice in my localIPv4 alias the Wlan_guest is in there.. This doesn't block anything on this interface since clients talking to each other on the same segment/vlan don't talk to pfsense - it is just there because I use the aliases on other interfaces as well.

      wlanrules.png
      wlanrules.png_thumb
      wlanrules.png
      wlanrules.png_thumb

      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
      • J
        Jamerson
        last edited by Nov 28, 2015, 3:15 PM Nov 28, 2015, 3:05 PM

        Than you so much for the explanation, well configured !
        can you suggest a AP who supports VLANS ?
        VLANS is going to be for free wifi ,
        VLANS for Co-Workers Desktops,
        when someone on the free wifi, shouldn't be able to see the desktops behind the other VLANS,

        so I can just create a firewall rules on each VLANS to block the connection from each others. is simple and easy way I believe .

        I order to have this working , need to have a Swtich who does support VLANS, and AP who does support VLANS.
        and on each switch port you configure the VLANs, and the AP need to be plugged on that specific port ?

        thank you

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Nov 28, 2015, 4:18 PM

          you don't need an AP that supports vlans unless you want to have different wireless networks based up ssid that want to control access between..  For example if you wanted a guest wifi network and a work wifi network using the same AP that on work you all them to talk to your desktops and other wired network devices, and guest you just let use the internet for example.

          I would recommend one of the unifi AP..  The new AC line is very reasonable priced.. $89 for the lite model and highend pro model $149 I believe..

          https://www.ubnt.com/unifi/unifi-ap-ac-lite/

          You can have 4 different SSIDs with different vlans each…  I run a ssid that requires eap-tls to auth, this is my normal wlan, I then have a guest wlan as you saw and also run a wlan-psk that is for my devices that do not support enterprise wpa2.. My nest thermostat for example, and my harmony hub.. Consumer grade electronics that are wifi quite often do not support wpa2 enterprise and only psk mode.

          Yes once you put separate your network into multiple segments/vlans then it is very easy to control access between them via psfsense.

          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
          • J
            Jamerson
            last edited by Nov 29, 2015, 6:04 PM

            @johnpoz:

            you don't need an AP that supports vlans unless you want to have different wireless networks based up ssid that want to control access between..  For example if you wanted a guest wifi network and a work wifi network using the same AP that on work you all them to talk to your desktops and other wired network devices, and guest you just let use the internet for example.

            I would recommend one of the unifi AP..  The new AC line is very reasonable priced.. $89 for the lite model and highend pro model $149 I believe..

            https://www.ubnt.com/unifi/unifi-ap-ac-lite/

            You can have 4 different SSIDs with different vlans each…  I run a ssid that requires eap-tls to auth, this is my normal wlan, I then have a guest wlan as you saw and also run a wlan-psk that is for my devices that do not support enterprise wpa2.. My nest thermostat for example, and my harmony hub.. Consumer grade electronics that are wifi quite often do not support wpa2 enterprise and only psk mode.

            Yes once you put separate your network into multiple segments/vlans then it is very easy to control access between them via psfsense.

            we are using switch HP ProCurve 1810G - 24 GE .
            and those Linksys AP.

            the idea is to provide two SSID one for Guest and one for office including the cables.

            Guest SSID need to be on VLAN 10
            Office SSID and Wired to be on Vlan 20

            switch has 24 ports. seen I can thrink the vlans on the switchs ports.

            How does the AP understands which IP to provide when the users are connected?

            1 Reply Last reply Reply Quote 0
            • D
              Derelict LAYER 8 Netgate
              last edited by Nov 29, 2015, 6:16 PM

              The AP needs to place traffic from one SSID onto one VLAN and the other SSID onto the other VLAN.

              From there you will probably be running DHCP on each VLAN on pfSense and it will be responsible for leasing IP addresses and settings on each network.

              It will look something like this:

              https://forum.pfsense.org/index.php?topic=88942.msg491727#msg491727

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • J
                Jamerson
                last edited by Nov 29, 2015, 8:51 PM Nov 29, 2015, 8:06 PM

                @Derelict:

                The AP needs to place traffic from one SSID onto one VLAN and the other SSID onto the other VLAN.

                From there you will probably be running DHCP on each VLAN on pfSense and it will be responsible for leasing IP addresses and settings on each network.

                It will look something like this:

                https://forum.pfsense.org/index.php?topic=88942.msg491727#msg491727

                Thank you so much,
                so tag the vlan on the switch port and plug the AP on the taged port . enable dhcp on the VLANS NIC.
                is the Linksys AP gonna work with this settings ?

                i have esxi 6.0 using pfsense as a vm on it.
                I've created vlan 20 on the hp physical switch and also in pfsense .
                tagged port 20 for Vlan 20.
                do i need a physical NIC of the host to be connect to the physical tagged port on the switch or it will works out of the box when i plug the AP to the switch ?

                please see attached i tried to design the idea.
                much appreciate it .

                ![example vlan_Page_2.jpg](/public/imported_attachments/1/example vlan_Page_2.jpg)
                ![example vlan_Page_2.jpg_thumb](/public/imported_attachments/1/example vlan_Page_2.jpg_thumb)

                1 Reply Last reply Reply Quote 0
                • D
                  Derelict LAYER 8 Netgate
                  last edited by Nov 29, 2015, 10:17 PM

                  No idea about the linksys. Sorry. If it supports multiple SSIDs with VLAN tags, it should work fine.  If not, no.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                  1 Reply Last reply Reply Quote 0
                  • J
                    Jamerson
                    last edited by Nov 30, 2015, 1:06 AM

                    @Derelict:

                    No idea about the linksys. Sorry. If it supports multiple SSIDs with VLAN tags, it should work fine.  If not, no.

                    thank you,
                    do I have to trunk a port on the switch ? create vlan on the switch port ?

                    1 Reply Last reply Reply Quote 0
                    • D
                      Derelict LAYER 8 Netgate
                      last edited by Nov 30, 2015, 1:17 AM

                      To send multiple VLANs over one switch port, yes, you need it to be a tagged port. "trunk" has at least two meanings when it comes to switch ports and is kind of vendor-specific so I like to avoid the term.

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jamerson
                        last edited by Nov 30, 2015, 10:42 AM

                        @Derelict:

                        To send multiple VLANs over one switch port, yes, you need it to be a tagged port. "trunk" has at least two meanings when it comes to switch ports and is kind of vendor-specific so I like to avoid the term.

                        do you mean create just a VLAN on the physical switch port no thrunk ?

                        1 Reply Last reply Reply Quote 0
                        • D
                          Derelict LAYER 8 Netgate
                          last edited by Nov 30, 2015, 3:39 PM

                          You typically don't create a VLAN on a port. You create a VLAN on a switch or a network of switches. Ports are either tagged or untagged on that VLAN. Tagged ports can carry multiple VLANs and are sometimes referred to as trunk ports.

                          All of this information is available in places like wikipedia and is not pfSense-specific.  I don't know why you want someone to take the time to re-explain that which is already explained elsewhere and is general networking knowledge.

                          Chattanooga, Tennessee, USA
                          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

                          1 Reply Last reply Reply Quote 0
                          • J
                            johnpoz LAYER 8 Global Moderator
                            last edited by Nov 30, 2015, 5:38 PM

                            keep in mind if your going to be running vlans on your vswitch you need to set it to 4095

                            vswitch.png
                            vswitch.png_thumb

                            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
                            • J
                              Jamerson
                              last edited by Dec 1, 2015, 1:22 AM

                              @johnpoz:

                              keep in mind if your going to be running vlans on your vswitch you need to set it to 4095

                              thanks john,
                              creating a vlan 4095 on the vswitch , creating vlan on the pfsense , and vlan on the physique switch and I am set to go ?

                              thank you

                              1 Reply Last reply Reply Quote 0
                              • J
                                Jamerson
                                last edited by Dec 9, 2015, 10:53 PM

                                John can you please help ?
                                i am stuck here.
                                i've bought the VLAN WLAN device
                                http://www.peplink.com/products/enterprise-access-point/pepwave-ap-one/#enterprise

                                VLAN is configured on the pfsense
                                VLAN 20 is configured on the switch on port 20
                                the AP is attached on port 20 on the switch.
                                VLAN 20 on the pfsense is having DHCP enabled
                                On the vSwitch i've created a port group with ALL (4095 ) but can't get it work

                                **when a use is connected to the AP they don't receive IP of VLAN 20 but of Default VLAN

                                what i am doing wrong ?

                                thank you**

                                1 Reply Last reply Reply Quote 0
                                • D
                                  Derelict LAYER 8 Netgate
                                  last edited by Dec 9, 2015, 10:59 PM

                                  Sounds like the AP is sending traffic to the switch untagged. Change your switch port to an untagged port on VLAN 20 and connect the AP to it.

                                  That's fine but you can only do one SSID. Else you have to figure out how to tell the AP to tag the traffic from that SSID with VLAN 20 and leave the switchport like it is.

                                  I notice you did not specify whether you made port 20 tagged or untagged on VLAN 20. It matters.

                                  Chattanooga, Tennessee, USA
                                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    Jamerson
                                    last edited by Dec 10, 2015, 8:48 PM

                                    @Derelict:

                                    Sounds like the AP is sending traffic to the switch untagged. Change your switch port to an untagged port on VLAN 20 and connect the AP to it.

                                    That's fine but you can only do one SSID. Else you have to figure out how to tell the AP to tag the traffic from that SSID with VLAN 20 and leave the switchport like it is.

                                    I notice you did not specify whether you made port 20 tagged or untagged on VLAN 20. It matters.

                                    thank you so much for your answer.
                                    the port 20 is untagged on the VLAN20 on the physical switch.
                                    attached is a picture

                                    PS : there is no cable right now just had to disaconnect it .

                                    from the vswitch is the settings correct ?

                                    V20.jpg
                                    V20.jpg_thumb

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      Derelict LAYER 8 Netgate
                                      last edited by Dec 10, 2015, 8:50 PM

                                      The settings on the switch are wrong or it would be working. The switchport going to the AP needs to be configured to match whatever the AP is configured to do.  Sorry, I don't have time to research your AP. You'll need to find out its capabilities.

                                      A VLAN with only one port on it can't talk to anything else. Where is your tagged port going to pfSense?

                                      Chattanooga, Tennessee, USA
                                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        Jamerson
                                        last edited by Dec 11, 2015, 1:15 AM

                                        A VLAN with only one port on it can't talk to anything else. Where is your tagged port going to pfSense?

                                        sorry I didn't get the question,
                                        can you ask it again ?

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          Derelict LAYER 8 Netgate
                                          last edited by Dec 11, 2015, 1:25 AM

                                          The fastest way to solve your issues is probably to find a networking text written in your native language that explains all this.

                                          Chattanooga, Tennessee, USA
                                          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

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