Can't ping subnet from remote via openvpn [RESOLVED]
Good day everyone.
I setup openvpn for remote access my office lan 192.168.2.0/22 and it works i can ping any 192.168.2.x, but i can not reach nor ping 192.168.3.x.
Can someone help me to understand why? Thanks
What is the remote clients local IP and mask?
BTW, x.x.2.0/22 not really how it would be stated x.x.2.x/22 would be in the network x.x.0.0/22 which would be x.x.0.0-x.x.3.255
When you call out x.x.2.0/22 that would actually be the host x.x.2.0 not a network. in the x.x.0/22 network.
Yup, you should always use the network address in the local subnets field in the OpenVPN server.
Since it's working for 2.x though there's probably some difference locally between those two subnets. Different subnet mask, missing firewall rule etc.
my remote pc without vpn connected is 192.168.0.21/24 and gateway 192.168.0.1/24
when i connect to vpn pfsense i got 10.0.2.11/24.
I think i miss some firewall rule? but which one?
Gertjan last edited by
I think you mean the local network is in conflict not the tunnel.
192.168.0.0/24 (your clients local subnet) is inside 192.168.0.0/22 (the subnet passed to client to access over the VPN). You won't be able to access anything inside .0/24 at the server end.
Thanks for your answers i will try to reply all 3 of you.
Gertjan it's clearly written in my original question which subnet i want but can't ping. Maybe you read carefully?
johnpoz i tried to change my local subnet now it's 192.168.4.0/24 which doesnt overlap anymore with the pfsense remote 192.168.1.0/22, but i still can not ping 192.168.3.1. which is my Esxi server.
Probably it has something to do with the esxi management port which is 192.168.3.1/22,
Esxi use a static ip, while all other devices use pfsense dhcp.
Probably this is the part dont let vpn reach esxi.
I wonder why from office lan i can access .3.1 and not from vpn this has no sense to me.
From vpn i can reach any office pc but not that specific one.
The only difference it's esxi is outside pfsense dhcp, but i can not setup esxi to get ip from pfsense cause pfsense is a vm of esxi.
it's quite damned tricky! i think the only "dirty solution" is to access virtual desktop of any office pc then access esxi through it, which i know will work.
Can you hit any host in the 192.168.3.X subnet?
If it's just that one host it's probably missing a default route on that host or blocking traffic from the tunnel subnet specifically.
yes i can ping all others.
i will chk on esxi firewall but i think it has no rules set. let's update after vacation :)
Doesn't have to be firewall - if it not pointing back to pfsense as its gateway, then no you would not be able to talk to it from another network.
And its not very intelligent to use the billion used 192.168.x.y for the local LANs. If you are in one of these networks with your client there will be of course no VPN connectivity anymore.
Its a bit more intelligent to then use some "exotic" networks for local LANs in the dumb 192.168 range like 192.168.273.0 or so or better go to the 172.16-31 range. That avoids address doubling in the 192.168range with the VPN client which every dummie in the world uses.
To make all your 2 LANs reachable you need to propagate both networks into the client routing table at VPN dialin with the "push route" option in the server.config file:
push "route 192.168.x.0 255.255.255.0"
Its of course NOT working in your case as you can see by yourself that you are using a 22bit subnet mask 255.255.252.0 on you local lan which includes the .3.x address range.
You local subnet reaches here from address .2.1 to .3.254. and that means you can NOT use the .3.0 as a separate subnet. This is basic IP subnetting and wrong subnet IP address design by yourself in that case !!!
On the other hand it makes too no sense to have 1022 possible clients in a layer 2 broadcast domain.
Set both of your local LANs to a 24 bit subnet mask 255.255.255.0 and set the sever push route command to 22 bits
push "route 192.168.2.0 255.255.252.0"
and that will do the trick !
If your client is a Winblows OS type "route print" when the client VPN is established and that way you can check if the routes are corretly distributed to the client by your server.
@lfoerster i found bad attitude to call others decision "not intelligent" especially if you ignore the intentions and background. Learn this lesson.
Second who cares if bilion of people use that subnet? We have our office rules and subnet scheme and we did it on purpose.
Third you dont even know our company subnet scheme but you judge this decision as not intelligent, what you don't know is we have 138 different locations around the globe and the range 192.168.0.0/22 is assigned to hongkong facility, all others are taken already.
Thanks for your tips i will apply this, will let you know if will work.
Ok tests has done. The electrician made a mistakes with lan cables and switches this is the reason why from VPN i can not ping 192.168.3.0/24, but i can ping 192.168.2.0/24 and 192.168.1.0/24.
Now without add or change any config on pfsense i can ping esxi on 192.168.3.1 because the cable now is in the right switch.
Before from office i can because in office my pc is connected with 2 ethernet cards on both layer2 subnets.
Thanks for all your tips.
JKnott last edited by
Rule of thumb, always suspect cables and connectors. I have a simple continuity tester, which I carry in my computer bag, just for testing cables at customer sites. This is just a simple go/no go test, not performance certification.