Lose access to LAN when running VPN

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
GeoffatMM
OpenVpn Newbie
Posts: 17
Joined: Wed Feb 20, 2019 7:11 pm

Lose access to LAN when running VPN

Post by GeoffatMM » Fri Jun 26, 2020 7:34 am

This is not urgent but annoying!

I am in France using SFR as my internet provider. The LAN is 192.168.0.0 with the router on 192.168.1.1. I have set up a DMZ on which I run a Deco P7 mesh wifi network using 192.168.1.10 and the wifi mesh provides a second LAN using 10.0.0.0 with the router (192.168.1.10) on 10.0.0.1.

I also run an IP phone on the first LAN on 192.168.1.65.

When I am running SFR without the VPN I can access all devices be they on 10.0.0.0 or 192.168.1.0.

When I start the VPN I can only access the DMZ LAN and the internet but not the main LAN of 192.168.0.0. I can access the VPN router on its default address of 10.10.0.1 (and see an apache message).

I can see that the OpenVPN server can see my secondary LAN (from where the client is requesting the OpenVPN service) but is unable to see the primary LAN as it does not know it exists.

How do I overcome this? Should I be pushing back 192.168.1.1 on the server side of the VPN or do I need to do something else to let it know the primary LAN exists?

I cannot see anything in the guides nor can I find a similar post on this issue.

Geoff

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 7342
Joined: Fri Jun 03, 2016 1:17 pm

Re: Lose access to LAN when running VPN

Post by TinCanTech » Fri Jun 26, 2020 12:07 pm

You are using --redirect-gateway ...

GeoffatMM
OpenVpn Newbie
Posts: 17
Joined: Wed Feb 20, 2019 7:11 pm

Re: Lose access to LAN when running VPN

Post by GeoffatMM » Wed Jul 01, 2020 4:44 am

OK, I have googled and read about the options and sort of understand it.

Some questions.

Some of the material says that the flags def1 and bypass-dhcp are only for windows clients. Is this true? If so I will remove them.

Also, someone showed that the redirect-gateway instruction should be in the client profile as well as on the server. My profile has no entry for this. Should it?

Finally, my original question, how can I push a connection or allow access to the local network for the client?

Ta.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 7342
Joined: Fri Jun 03, 2016 1:17 pm

Re: Lose access to LAN when running VPN

Post by TinCanTech » Wed Jul 01, 2020 1:31 pm

GeoffatMM wrote:
Wed Jul 01, 2020 4:44 am
Some of the material says that the flags def1 and bypass-dhcp are only for windows clients. Is this true?
No.
GeoffatMM wrote:
Wed Jul 01, 2020 4:44 am
someone showed that the redirect-gateway instruction should be in the client profile as well as on the server
This is total nonsense and obviously your source doesn't know what they are yakking about.
GeoffatMM wrote:
Wed Jul 01, 2020 4:44 am
how can I push a connection or allow access to the local network for the client
The Howto has detailed instructions.

Post Reply