OPNsense Forum

English Forums => General Discussion => Topic started by: daniel329 on May 28, 2018, 07:45:57 pm

Title: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 28, 2018, 07:45:57 pm
Hi all,
I'm new to OPNSense but I'm getting the hang of it. Really an impressive piece of software.

I followed the Wiki guide located here to set up an OpenVPN Server.

After completing it I am able to make a connection but I can't access anything on the LAN and my IP Address still shows the IP address of the network my device is currently connected to. It doesn't change to the IP address of my home server.

When I ping devices on the network (MacOS Terminal) I get the response: "Request timeout for icmp_seq 0"

I've attached screenshots of my configs. Please let me know if you need anything else. Appreciate any help!
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 28, 2018, 07:46:15 pm
One more screenshot
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 28, 2018, 08:56:44 pm
Confused.. what do you mean 'It doesn't change to the IP address of my home server'?

The server sits on your LAN, you are connecting from the WAN to the LAN using VPN, the server on the LAN will not change address... as I said, confused.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 28, 2018, 08:59:48 pm
Whoops sorry that was worded poorly. When I connect to my home via VPN my device should assume the IP address of my home internet connection. It doesn’t.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 28, 2018, 09:57:24 pm
No it shouldn't, you should be able to connect to anything on your LAN, but that's done by routing. For example, say your LAN is 192.168.1.0/24. Use the wizard to create an OpenVPN INSTANCE with a subnet of 192.168.3.0/24.What that means is that any device connecting on the VPN will get an address 192.168.3.×, the Opnsense OpenVPN wizard will create a route automatically.

Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 28, 2018, 10:52:25 pm
Right - but my device should be located behind the IP address of my home internet connection. I understand this is how VPNs obscure your IP Address so services like NetFlix can be accessed. Right now my IP address is staying the same. This is wrong no?
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 29, 2018, 09:12:36 am
It will be. If you  look at it as if you have two LAN segments. One is your normal LAN, the other is the VPN 'LAN'.

What happens is, that your OpenVPN client connects to your WAN, any request that the client sends to the Internet will be routed via the VPN, that is provided you have set the client to force all traffic through the VPN connection - Thus as far as the target system is concerned, i.e. Netfix etc, that request is seen coming from your the WAN address of the VPN server. The only catch with this is that it does not work with Sky U.K. for thier 'Q' systems. If you don't use it I won't explain why.

Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 31, 2018, 12:14:57 am
Correct. But that's the problem. Right now when I connect to my VPN (successful connection through Viscosity) my WAN IP does not change to the WAN IP of the VPN Server. It stays the same as the point I am connecting from. I also can't access any devices on the network I am connecting to.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 31, 2018, 12:22:59 am
It will stay the same as the WAN IP your connecting from, For example, say I'm in a hotel, Wifi gives me a local address of 10.10.10.123, my home VPN network, as explained earlier is 192.168.3.0. My Laptop WAN address, even when connected will stay at 10.10.10.123, only the VPN endpoint in the software will show an address in the 192.168.3.* range. If my WAN address changed, no  traffic would be able to route through the hotel network.


What is your LAN net range, and what is your VPN net range?
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 31, 2018, 12:25:07 am
LAN IP is 192.168.1.1/24 and VPN is 10.0.0.0/24
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 31, 2018, 12:26:35 am
It will stay the same as the WAN IP your connecting from, For example, say I'm in a hotel, Wifi gives me a local address of 10.10.10.123, my home VPN network, as explained earlier is 192.168.3.0. My Laptop WAN address, even when connected will stay at 10.10.10.123, only the VPN endpoint in the software will show an address in the 192.168.3.* range. If my WAN address changed, no  traffic would be able to route through the hotel network.


What is your LAN net range, and what is your VPN net range?

I think what confuses me about this is if I use a service, say Private Internet Access, the WAN IP address of my device is obscured so sites think it's coming from a different location than it is. I guess this isn't the case with OpenVPN? When I run an IP check on various sites it hasn't changed when connecting through my VPN.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 31, 2018, 12:31:07 am
No, your right it won't OpenVPN is a tunnel between your device out in the field and your home network. If you get a VPN connection, then sites will see your address as your home WAN address, that's providing you have set the VPN to route ALL traffic through the VPN tunnel. If you want to mask your address, then use something like Tunnel Bear.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 31, 2018, 12:38:05 am
Right. But regardless I’m still unable to access anything on the network. If I set viscosity to force all traffic through the VPN (so I can watch Netflix abroad) I lose access to the internet completely.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 31, 2018, 12:38:29 am
If you get a connection, check your VPN logs, here's mine from a connection from my mobile phone, BTW I use the official OpenVPN client, it's free and it works.


openvpn[53611]: martin/89.194.161.62:43857 MULTI_sva: pool returned IPv4=192.168.4.6, IPv6=(Not enabled)


The 89.*.*.* address is my mobile phone WAN address, the 192.168.4.6 is the VPN endpoint address of the same phone.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 31, 2018, 12:41:53 am
OK, so it's likely there's an issue with the firewall entries.


Did you use the wizard to create the VPN?
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: daniel329 on May 31, 2018, 03:00:21 am
OK, so it's likely there's an issue with the firewall entries.


Did you use the wizard to create the VPN?

I followed the OPNSense Wiki. I may go ahead and try the wizard separately.
Title: Re: No LAN Access over OpenVPN after using Wiki How-To
Post by: marjohn56 on May 31, 2018, 08:10:33 am
I don't know why they bother creating the wizard... 8)


You're better off using the wizard, there are just too many variables with OpenVPN. Use the wizard and then tweak if you need to is my preferred method.


Make sure you remove completely the existing VPN instance, and any firewall entries too.