Client can't see server's LAN

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client can't see server's LAN

Post by TinCanTech » Tue May 09, 2017 7:31 pm

opapanik wrote:I am now thinking of setting up a linux machine for the sole purpose of locating the problem
I ditched windows completely and never looked back 8-)
opapanik wrote:1. added routing from 10.20.31.0/24 (VPN addresses) to 10.20.30.10 (LAN IP of windows VPN server)
You might expect this to work .. but .. instead, select a host you want to be able to ping over the VPN and add static routes to it.
opapanik wrote:So far I have only tried to make the server-side LAN accessible to the VPN client. I have NOT also activated the configuration settings that would allow access to the client-side LAN. You think that could be a problem and I should try to enable them both at the same time?
NO .. you do not require routing both ways because the server LAN host will only see the VPN IP.

Do not try to use the server log at high verb-age to confirm packet transmission, that is not what the log is telling you. Use Wireshark on the server (or other sniffer) to determine where the packets are discarded.

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Tue May 09, 2017 9:03 pm

TinCanTech wrote:I ditched windows completely and never looked back 8-)
I do not disagree but it's a big discussion.
TinCanTech wrote:
opapanik wrote:1. added routing from 10.20.31.0/24 (VPN addresses) to 10.20.30.10 (LAN IP of windows VPN server)
You might expect this to work .. but .. instead, select a host you want to be able to ping over the VPN and add static routes to it.
I am not really sure I understand what you say I should switch it to. This was according to the HOWTO:
"The last step, and one that is often forgotten, is to add a route to the server's LAN gateway which directs 192.168.4.0/24 to the OpenVPN server box (you won't need this if the OpenVPN server box is the gateway for the server LAN)."
and as far as I can tell it is the reason I can ping from any LAN machine to the VPN client. It is referred as static routing on the router.
TinCanTech wrote:NO .. you do not require routing both ways because the server LAN host will only see the VPN IP.
Thanks for clearing this.
TinCanTech wrote:Do not try to use the server log at high verb-age to confirm packet transmission, that is not what the log is telling you. Use Wireshark on the server (or other sniffer) to determine where the packets are discarded.
True but at least as a quick and dirty trick I could confirm the ping is routed from the client through the VPN and reaches the server, no? The problem begins there..

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 11:48 am

Ok here's a good one:

if I initiate pings from both sides (as in LAN machine > VPN client and vice versa) at almost the same time, the VPN client sees the LAN machine (gets replies to its pings)!!!

Even more strange, for some of the LAN clients this lasts only a few minutes: the VPN client gets replies to its pings for some minutes after the initial "meeting". After a while it does not, and a new ping from the LAN machine toward the VPN client is required for the latter to "see" the LAN machine again!

For other LAN clients it seems to be a once-I-saw-you-I-know-you kind of thing and the VPN client can find them after the initial "meeting".

There are two switches in my network a 100mbps and a 1gbps. (I do turn off all network hardware when I have routing problems and have done it already before posting here)
Could it be a switching (hardware) problem?

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: Client can't see server's LAN

Post by Pippin » Wed May 10, 2017 12:38 pm

Windows firewall is a stateful firewall.
My guess:
Your Windows firewall is not completely shutdown.
It remembers the state for a "certain time" of the ping coming from LAN machine going to VPN client.
If ping the other way and it succeeds then the state is still in the state table.
After a "certain time" the state is deleted from the state table and ping will not succeed.

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 12:58 pm

Checked windows firewall like that:
Open Network and Sharing Center > Windows Firewall > Turn Windows Firewall On or Off > Off (for both Home or Work and Public networks)
Continued to Advanced Settings > Windows Firewall Off (reported) for Domain Profile, Private Profile and Public Profile
(menu) Action > Properties > (for every one of the 3 profiles) Customize (protected network connections) > unchecked TAP adapter
Continued to Monitoring > Windows Firewall Off (reported) for all networks

Shut everything (hardware) down. Restarted. No changes in my situation.

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 1:07 pm

Setting aside this strange behaviour and returning to the problem. Talking about the unsuccessful pings from VPN client > LAN machines now:

I have confirmed that all pings from the VPN client reach their LAN targets. It's the answer that cannot get back to the VPN client.
So I guess I have a routing problem. But how can it be that (from LAN machines) answers to pings are not routed when initiating pings are ?

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 5:20 pm

Nailed it! It's the router. A new TP-Link TD-W9977 VDSL N300 router.

Had to dig up my old ADSL router (TP-Link TL-WR340G). As soon as I set it up using same subnets and all and put it in place, bam! Problem gone!

Probably a firmware bug with the TD-W9977. Now I have to contact TP-Link..

Thanks everyone.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client can't see server's LAN

Post by TinCanTech » Wed May 10, 2017 6:15 pm

Thanks for letting us know what the real cause of the problem 8-)

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: Client can't see server's LAN

Post by Pippin » Wed May 10, 2017 6:27 pm

Ah yup, if it`s not routing correctly that would explain it.
Happy VPN`ing :tumbsup:

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 8:19 pm

Correction: the TL-WR340G is not ADSL, just (wireless) router.
Anyway, I posted in TP-Link's forum.

Thanks again.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client can't see server's LAN

Post by TinCanTech » Wed May 10, 2017 11:08 pm

Is there any real doubt ?

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 11:14 pm

I'm sorry, I don't get you. Doubt about what?

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client can't see server's LAN

Post by TinCanTech » Wed May 10, 2017 11:36 pm

If it is openvpn at fault .. or not ?

opapanik
OpenVpn Newbie
Posts: 19
Joined: Sun May 07, 2017 9:04 am

Re: Client can't see server's LAN

Post by opapanik » Wed May 10, 2017 11:45 pm

Oh no, OpenVPN is fine I guess.
As I said above all I did was switch hardware and the problem was gone. The only setup I did was on the old router cause it had defaults like 192.168.0.1 and stuff. Didn't touch any PCs or Androids.
Sorry if it wasn't clear (English not my native language)

So, simple hardware change and problem gone, seems clear cut who's at fault, to me. Have informed TP-Link and asked to address the probable firmware bug of TD-W9977.

Waiting for reply.

horhe713
OpenVpn Newbie
Posts: 1
Joined: Fri Dec 25, 2020 2:26 am

Re: Client can't see server's LAN

Post by horhe713 » Fri Dec 25, 2020 2:31 am

I would like to reopen this thread as i am at the same boat with our friend but tried 3 different routers and NONE solved the problem... In fact im doing EXACTLY what i used to do and it was working o ly now it doesnt work... There must be an error somewhere else and not the router... If somebody reads this ill post my details

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client can't see server's LAN

Post by TinCanTech » Fri Dec 25, 2020 2:38 am

horhe713 wrote:
Fri Dec 25, 2020 2:31 am
If somebody reads this ill post my details
:roll:

zxun
OpenVPN User
Posts: 24
Joined: Mon Jan 04, 2021 2:26 am

Re: Client can't see server's LAN

Post by zxun » Mon Jan 04, 2021 10:31 am

You need to ping server on its LAN address 10.20.30.10
If this suceeds, it is because you have not turned "ipv4_forward" on at VPN server.
Thus it will not route an incoming traffic with destination not itself.

Post Reply