Unable to ping between lan and opt
-
@viragomann said in Unable to ping between lan and opt:
So I guess that the network settings are wrong on the Pi. Check it's gateway and network mask.
- How do I do this?
- Would the same possibility be a thing on the Ubuntu box
-
@bgksdfol said in Unable to ping between lan and opt:
I can ping both from pfsense
If you can ping from pfsense opt IP, but not from lan IP from pfsense.. this points to couple of things it could be.
- your pi has no gateway or the wrong gateway.. Should be pfsense opt1 IP.
- Possible issue with the pi mask.. Where it thinks the lan IP on its same network. For example if using a /16 and your lan is 192.168.x and your opt is 192.168.y
- firewall on the pi..
So to prove to yourself its the pi not answering - just do a simple packet capture on the opt interface while you ping from the lan network.. Do you see the ping going out via you packet capture.. If so then for whatever reason the pi didn't answer..
edit: is your pi getting dhcp from pfsense, or did you set it IP statically on the pi?
On the pi you can do this to check its gateway and mask..
-
@bgksdfol
You should at least be able to ping all interfaces of pfSense with the allow any rules.
If you only can ping the the interface IP, which the device is connected to, I would suspect that there is something wrong with the network settings, either on the device or on pfSense. -
@johnpoz 1) pi mask is 255.255.255.0
2) Both are on a /24 mask
3) The pi doesn't seem to have ufw installed -
@viragomann Any suggestion on what to check?
-
If a client device cannot ping its gateway then try another client device in its place. If that device can ping its gateway then you have ruled out your router as the problem.
If that new device still cannot ping a gateway then you can figure a configuration issue on your router.
-
@bgksdfol said in Unable to ping between lan and opt:
pi mask is 255.255.255.0
And is the gateway correct?
-
@bgksdfol It can ping its gateway, but not the gateway of the other lan port on the router
-
@johnpoz It is 0.0.0.0 so I am going to assume not
-
@bgksdfol said in Unable to ping between lan and opt:
It is 0.0.0.0 so I am going to assume not
That would default destination - but the IP, ie the gateway is what when you do a route -n
See my above screenshot from my pi..
My gateway is 192.168.3.253, which is pfsense IP on that vlan. if you don't your gateway pointing to pfsense IP on this network, then no your never going to ping anything off its network, nor would you be able to answer anything coming from another network.
-
@johnpoz The Destination is 40.0
Gateway is 0.0.0.0
mask is 255.255.255.0How do I correct the gateway?
-
@bgksdfol why don't you just set the pi to get its IP via dhcp?
Pretty sure that is the default, if you want your pi to always have the same IP - you can just easy set a reservation in pfsense dhcp server. Is that what you did and you put in some gateway there?
-
@johnpoz So the pi is getting a static ip from the OPT dhcp server. I am not sure how to set a gateway in the DHCP server
-
@bgksdfol so you setup a reservation there.
so for example here is reservation for my pi
The gateway should be left black, so it defaults to telling the client to use the pfsense IP on that network as its gateway. Did you put something in there? like 40.0 ?
-
@johnpoz The gateway field is empty on both the lan and opt dhcp server
-
@bgksdfol well then something wrong with your pi - if you plug in a laptop or pc to that network do you get the correct gateway?
Can we see the output of your route -n?
destination of 0.0.0.0 is correct for default route.. That should have gateway pointing to the IP address of pfsense on this network, which I take is x.x.40.1 (btw there is zero reason to hid rfc1918 space..
If your gateway says its 40.0 then that is wrong, but I don't see how pfsense would of handed that out?? You could of maybe overridden the dhcp settings on the pi?
Notice my output from above - gateway of 0.0.0.0 is correct for the local network, in my case 192.168.3.0..
default route (destination) 0.0.0.0 points to my pfsense IP 192.168.3.253 on this network.
the route to get to the network my pi is on 192.168.3.0/24 (see the mask 255.255.255.0) would 0.0.0.0
-
-
@bgksdfol
I read recently a post here, where a Pi didn't obey the gateway from the DHCP server.
Try to set it static.
Found this: https://raspberrypi.stackexchange.com/questions/57655/fixing-gateway-on-dhcp-connection-raspberry-raspbian -
@bgksdfol ah - yeah never going anywhere without a default gateway.. Never had any issues with my pi's have run many of them over the years currently 2 of them running..
What OS are you running on them?
Mine are both running
pi@pi-ntp:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" pi@pi-ntp:~ $
haven't looked at @viragomann link yet - but that might have a work around..
-
@johnpoz said in Unable to ping between lan and opt:
Mine are both running
Debain 7 (wheezy)
It is an old raspberry 2