• @cburbs said in Vlans and firewall rules:

    Also I noticed on my Vlan test I can still ping all my devices on my LAN even though I have a rule set for that.
    So..
    Laptop on Lan can ping test vlan. But only one of the devices not both which is odd. This is by IP.
    My other laptop on test vlan can ping my lan pfsense, switch, AP, etc

    What switch do you have? Some cheap switches are known to leak VLAN1.

    Also I have pfblockerng setup on my lan. What needs to be done to pass all Vlans on this as well?

    You can tick the box inside pfblocker to create floating rules, or just select the interfaces you would like to pfblocker to create the firewall rules.


  • @mcury

    TP-Link TL-SG1024D

    What do you use?

    Also what is the difference with using "Floating Rules"


  • @cburbs I'm not sure if this switch has a problem with VLAN 1.
    I know other TP-Link switches that this problem happens, like TL-SG105E or TL-SG108E, in hardware revisions 1, and 2.

    If I remember correctly, they fixed this in revision 3, 4 and 5..

    And they were leaking multicast and broadcast, not sure if that was happening to ICMP ..

    Do you have a firewall rule to block ICMP from vlan test to LAN?


  • It is Versionn 4..0

    No on the ICMP rule.


  • @cburbs If you don't have a block rule, this ping from vlan test to LAN will work through the Internet Rule or (ipv4 allow all)

    You have to explict block it, and put this rule above the internet rule.


  • @mcury Makes sense! Thanks.


  • @cburbs

    Ok I have my Picore music Player working with my LMS server.

    So vlan 60(test vlan) can talk to my LMS server.

    I also have an Nvidia Shield on this Vlan 60. My Iphone is just on my lan network what needs to be done so I can cast something from my phone to the Shield?


  • @cburbs Chromecast works with mdns, which can be accomplished with the avahi package in pfsense.
    Not sure if nvidia shield works with mdns, you would have to test and confirm.

    Then, after installing avahi, you would need to create firewall rules to allow your iphone to reach the nvidia shield.
    Chromecast uses tcp 8008 and 8009, but not sure about nvidia shield

    For testing purposes, you can create a rule to allow everything from your iphone to the nvidia shield.

    Or, just put the nvidia shield in the same VLAN as the wireless devices..


  • @mcury

    Do you think it makes sense to have Vlan3(video streamers) and vlan5(music streamers) or would you just put them into one Vlan?

    Also if in Vlan5 I have one device that just needs Internal access and nothing else is that just a block rule?


  • @cburbs said in Vlans and firewall rules:

    Do you think it makes sense to have Vlan3(video streamers) and vlan5(music streamers) or would you just put them into one Vlan?

    I always choose to separate servers, like samba, nas with file storage, and plex, from other devices.

    So, in my scenario, I have 4 vlans.

    MGMT - To manage devices
    LAN - Servers
    WIFI - My family devices, TVs, chromecasts, printers and etc
    GUEST - for friends that come here

    In your case, I would remove VLAN5, and put video streamers and music streamers in the same vlan, which would be VLAN3.

    But that is my personal choice, of course other users could have a different approach.

    Also if in Vlan5 I have one device that just needs Internal access and nothing else is that just a block rule?

    If you have a device in VLAN5 that needs to access VLAN3, you would create a firewall rule allowing the device (IP address), to access VLAN3, then, you would create a second rule, below the first one, blocking the entire network to access other vlans.
    In the last position, the internet rule, allowing any.


  • Let me rephrase that....
    In vlan3 I have one device(AVR) that doesn't need access to anything.

    My Iphone just needs access to it to control it from an App.


  • @cburbs The idea would be the same.
    Firewall rules goes from top, to bottom.

    Just block the DVR to access all other things, this rule must be in the top.

    Your phone, that I'm assuming that is in other VLAN, you create a firewall rule in this other VLAN allowing the iphone to access the DVR, then you block other devices to access the other vlans, and finally the internet rule allowing everything.

    In case iphone and DVR are in the same VLAN, they wouldn't communicate through the firewall, it would go directly through the switch.


  • @mcury

    Drawing it out as it helps me sometimes

    9be7b849-5c74-458c-91de-f002411335f1-image.png

    So my Iphone which is on Vlan7 needs to talk to my Denon Receiver on Vlan3.

    You mention creating the rule in Vlan 7 to talk to the device in Vlan 3.

    Could you also do it the other way around and create the rule on Vlan 3 to allow the Iphone in?

    Is one way better than the other? and why?


  • @cburbs Creating the rule in VLAN3 wouldn't work.

    The interface where the packet is coming from, needs to allow that flow in first place, otherwise the firewall would drop the packet.

    pfsense is a stateful firewall, which means that if the packet is allowed to enter, the return of the packet would work, even without a rule.

    So, for an example, you can create a rule blocking everything in VLAN3, so all VLAN3 ip addresses would be blocked to enter the firewall.

    But, if you come from VLAN7, and if there is a rule allowing this flow, the return traffic from VLAN3 would work, even with a block everything rule.


  • @cburbs
    My Onkyo Remote APP won't play if my phone/Ipad isn't on the same Vlan.
    The Phone (App) simply won't detect the AMP.

    Bloody sw devs

    Considering to trace a bit on the APP , and maybe try this package, if it fits the need

    https://forum.netgate.com/topic/155698/how-can-i-get-this-udp-relay-package-for-casting-across-vlans


  • @mcury

    So if I setup the "Block to firewall" rule like you have in the one post but I have no internet access when it is enabled? Am I missing something ,,

    Isn't that just blocking access to anything on the pfsense box?


  • @cburbs That is not how it works.

    The packet has a source, and a destination.

    When the packet goes to the internet, the any is the destination, let's say google DNS for an example, so the destination is this case would be 8.8.8.8;
    The firewall would see a packet going to 8.8.8.8, and not to the firewall itself.

    That "Block to firewall" rule, is to block users from reaching the firewall itself, and not to block users to go through it..

    If the firewall is the destination of the packet, the pfsense GUI for an example, that "Block to Firewall" rule would block it


  • @mcury

    Ok I looked at one of your earlier posts -

    f810a3e2-5ab1-417f-a914-004acd04d8d8-image.png

    Saw your note about DNS - That was my issue no DNS being used.

    So let's back track for a moment -
    These items I want on Internet Only Vlans I still want to protect them in a sense.

    • would still like to use the DNS resolver I am using on the main Lan
    • Still want them also hitting pfblockerng as well
    • Can't access other lan/vlan

    Doable, strange, silly, odd?


  • @cburbs It would be like this:

    03a9ab31-01c1-41fd-8cc2-dbdc1880a80c-image.png

    First rule is the DNS, in my case, it's disabled, but its only to show you, in your case, you would need to enable it.

    First rule allows DNS to pfsense.
    Second rule block everything to the firewall itself.
    Third rule allows Plex from WIFI_NET to the plexnassrv in another vlan
    4th rule blocks everything from this vlan to the other vlans
    5th rule Internet allow ipv4
    6th rule Internet allow ipv6


  • @mcury

    Wow way too much time spent on this lately but finally getting it to where I want it to be.

    Vlan.jpg
    Vlan1: Management
    This is the Lan off the pfsense firewall. It has access to pfsense gui, all switches, ap, vlans.

    Vlan3: Server
    Unraid server running plex, LMS, a few other things
    Allowed: pfBLockerNG, DNS, Plex to HDHomeRun tuner on Vlan4, Internet
    Blocked: Firewall & Internal communication.

    Vlan4: Home Theater
    Denon Receiver, (3) piCorePlayers, (2) Nvidia Shields, Xbox, (2) HDHomeRun Tuners
    Allowed: pfBLockerNG, DNS, Plex players to Plex on unraid, piCorePlayer to LMS on unraid, Internet
    Blocked: Firewall & Internal communication.

    Vlan5: Work
    Work laptop, (2) VOIPs
    Allowed: pfBLockerNG, DNS, Internet
    Blocked: Firewall & Internal communication.

    Vlan8: Wireless
    (2) Iphones
    Allowed: pfBLockerNG, DNS, Internet
    Blocked: Firewall & Internal communication.

    Vlan9: Guest Wireless
    (2) Chrome books, (2) iphones, (2) kindles, PicorePlayer, roku, PC
    Allowed: pfBLockerNG, DNS, Internet
    Blocked: Firewall & Internal communication.

    Equipment:
    Pfsense box: HP Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, 16 gigs of ram, HP 4 port ethernet card - Packages running: aprwatch, iperf, nmap, ntopng, pfBlockerNG, RRD_Summary, Status_Traffic_Totals, Telegraf

    Access Point: Netgear R7800 running Openwrt

    Switches: TP-Link TL-SG1024DE, (2) TP-Link TL-SG108PE

    Server: ASRock X99 Extreme3, CPU 2GHz 12 cores(24 HT), 32gigs ram
    Unraid
    Parity Drive: 4tb
    15TB HD Space
    Cache Drive for Dockers
    Unassigned drive for VMs (Windows, Hassio, Linux)

    Things still testing:
    Iphone control while on Vlan8 to items in Vlan3(plex), Vlan4(Receiver, PiCorePlayers, Shields, Roku).

    Verify anything in Vlans 3+ can't get to pfsense box, switches, APs, Server.

    I am sure I am forgetting something.