[SOLVED] Cannot ping devices in other VLAN
-
@johnpoz
Thanks for your reply.Maybe its not 100% clear for me whats the difference between a layer 2 and 3 switch. I thought the only difference was that one of both supports VLANs and the other doesn't. Sorry when it should be a layer 2 switch in the diagram. I will change/update it tomorrow.
I already found in the internet that in some cases the host blocks trafic from another network. For that reason i already tried to ping the pfsense port in the other network as you asked before i posted the question and NO its not possible. So i think it has nothing to do with the host firewall(s).
-
Well if you can not ping pfsense IP in the other vlan.. Then yeah you have something wrong.
Post your rules for the vlan your pinging from - you sure you didn't leave it on tcp.. .This would block ping..
Layer 3 switch can route, vlans are layer 2..
If you wanted to call out that your switch was doing vlans, you could label say smart ;) Or managed..
I take it your clients in each vlan are getting ips from pfsense, and can use the internet through pfsense? They can not just ping each others network? Your rule you showed was not doing any policy routing - ie forcing traffic out out a gateway, which would prevent vlans from talking to each other.. But you only showed 1 vlan.. Do you have any floating rules?
All that is required for device to route through pfsense.. Is for the networks to be setup in pfsense, and the firewall rules to allow the traffic...
-
@CodeNinja
There are plenty of differences between purely Layer2 and Layer3 switches, for example there is one such terminology including L2+ or L3+.
Basically, L2 + or L3/L3+ is also capable of some basic routing. (static route, the L2+ switch adds some L3 features. For example: DHCP snooping, ACL rule according to IP address.
The L3+ switch adds some L4 features. For example, you can classify traffic according to socket number.It is necessary to understand these concepts first and then to deal with VLANs,
although you described perfectly well, what you would like to apply in your example -
@johnpoz said in Cannot ping devices in other VLAN:
Thanks for the patience and support.I updated/re-wrote my question and included my most recent findings - as i'm able to ping the pfsense interfaces also from the other VLAN since this morning (i have no idea why this didn't work yesterday). I did not change anything to the firewall rules (except for the description). I had (and still have) 2 firewall rules
allow * from * to *
on both VLANs.I hope my re-written question is more clear for those who want to help me but also for people who run into a similar issue i have.
Layer 3 switch can route, vlans are layer 2..
If you wanted to call out that your switch was doing vlans, you could label say smart ;) Or managed..Thanks will keep this in mind for future questions
I take it your clients in each vlan are getting ips from pfsense, and can use the internet through pfsense? They can not just ping each others network? Your rule you showed was not doing any policy routing - ie forcing traffic out out a gateway, which would prevent vlans from talking to each other.. But you only showed 1 vlan.. Do you have any floating rules?
Ok, this sounds like it could be my problem. I only have the 2 mentioned rules and if i understand well, these rules do no "policy routing" which is required for communication over VLANs or different networks ? How do i configure a rule with "policy routing", simply by give an explicit source and destination?
All that is required for device to route through pfsense.. Is for the networks to be setup in pfsense, and the firewall rules to allow the traffic...
Thats also what i found on the internet. Both networks are setup in pfsense for 100% sure so that shouldn't be the problem so the rules are the only thing left... I thought a "wild card" rule should always work but it doesn't ? (at least not in this case?)
-
I can ping devices in the other VLAN now with the settings from the question!
As i was able to ping the the Pfsense interface in VLAN 20 from the host in VLAN10 this morning i tried to ping the host in VLAN20 as well. As this failed i started checked what @johnpoz said:
Prob the most often missed thing is host firewall/security software that blocks traffic from the other network..
I would say this is number 1 issue, or client not using pfsense as gateway..After disabling the firewall on the host, it was possible to ping the device in the other network.
I'm currently not able to SSH to the device in VLAN20 so i will continue digging and post updates here.
-
@CodeNinja said in Cannot ping devices in other VLAN:
I thought a "wild card" rule should always work but it doesn't ?
Those rules would work! They are full any any rules...
With those rules - you would be able to access ssh or http if the dest devices allowed it... Again simple enough to just sniff..
If you can ping the device, there is zero reason with those rules listed why you wouldn't be able to ssh.
-
@johnpoz said in Cannot ping devices in other VLAN:
If you can ping the device, there is zero reason with those rules listed why you wouldn't be able to ssh.
I thought that also but its not possible to SSH.
I setup a new machine (PC3) in VLAN20. I can SSH from PC3 to PC2 but i can't from PC1 (VLAN10).
In my experience this is wierd as i can ping from PC1 to PC2. All PC's are clean ubuntu 20.04 installations with a disabled firewall see:root@pc2:# ufw status Status: inactive
This let me think that it is still a pfSense configuration thing but i'm not sure.. How can i find this out?
Do i need something like NAT configuration to be able to -
@CodeNinja said in Cannot ping devices in other VLAN:
How can i find this out?
As already stated.. .sniff on your dest vlan interface in pfsense.. Now generate traffic from vlan 10.. Do you see pfsense send that traffic?
Here.. sniffing on my dmz interface 192.168.3, I sshed to a box from my 192.168.9 network (lan) you see the traffic..
do you see that first syn get sent on by pfsense?
If you see pfsense send the syn on to your dest IP.. Pfsense did what it was suppose to do, if you don not see an answer that is on the dest device not answering, or not getting what pfsense sent on.
Unless your running some IPS on pfsense, that could be blocking the traffic.. All that is required is the firewall rule to allow the traffic you want. Which your any any rule would do.
Do i need something like NAT configuration to be able to
NO!!! you would not be natting traffic between local vlans.. Did you dick with outbound nat?
-
@johnpoz
After a reboot of PC2 it works fine now. I can ping and SSH.THANKS A LOT for the support. Is there a way i can do something back?
p.s. the sniffing example/explanation is helpful other situations i'm working on so also thanks for that!.
-
@CodeNinja said in [SOLVED] Cannot ping devices in other VLAN:
Is there a way i can do something back?
Pay it forward ;) If you can help someone else here - that is always good for the community.. Or help someone else in some other way if you can.
Glad you got it sorted.