[HELP]Setup Brand New OpenVPN to allow LAN Connection

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.
Post Reply
HelderIngor
OpenVpn Newbie
Posts: 2
Joined: Tue Oct 08, 2019 11:12 am

[HELP]Setup Brand New OpenVPN to allow LAN Connection

Post by HelderIngor » Tue Oct 08, 2019 11:16 am

So i'm new to openVPN, after setting it up, and connecting between client - server , i need both to allow LAN connection

So my setup is as follow (as for now) Client is set on the 192.168.1.X ip range Server is set on the same range (OpenVPN is installed on 192.168.1.2) Gateway on server "network" is 192.168.1.254

i need the client to connect to server and , for example, access a smb share on it

This is both the Server and Client ovpn file


SERVER OVPN

port 1194
proto udp
dev tun
ca "C:\\OpenVPN\\ca.crt"
cert "C:\\OpenVPN\\server.crt"
key "C:\\OpenVPN\\server.key" # This file should be kept secret
dh "C:\\OpenVPN\\dh2048.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3



CLIENT OVPN
client
dev tun
proto udp
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\OpenVPN\\VPN1-ca.crt"
cert "C:\\OpenVPN\\VPN1.crt"
key "C:\\OpenVPN\\VPN1.key"
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
verb 3


I know it sucks just "asking" for it, but tried changing to dev tap, routing, etc and i just can't seem to figure it out.

Any help would be helpful

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

Re: [HELP]Setup Brand New OpenVPN to allow LAN Connection

Post by TinCanTech » Tue Oct 08, 2019 1:08 pm

HelderIngor wrote:
Tue Oct 08, 2019 11:16 am
Client is set on the 192.168.1.X ip range Server is set on the same range
And if you read your logs you will find this:
NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
So change them for a start. At least change your server LAN.

HelderIngor
OpenVpn Newbie
Posts: 2
Joined: Tue Oct 08, 2019 11:12 am

Re: [HELP]Setup Brand New OpenVPN to allow LAN Connection

Post by HelderIngor » Tue Oct 08, 2019 1:40 pm

I'm still testing it locally, so it's kind of hard connecting to another network.

But i did an Hotspot, with no connection to the main network from my cellphone, on 192.168.43.x and i still can connect, but i can't see the "main lan"


UPDATE:

So after trial and error, i got the 2 machines to recognize themselves, by their "tunnel ip"

The server is on 10.10.10.1 and client is 10.10.10.5 and they can both ping each other

Now, how do i make the client see for example, the whole network (my windows server is on 192.168.1.2)

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: [HELP]Setup Brand New OpenVPN to allow LAN Connection

Post by 300000 » Fri Oct 11, 2019 10:03 pm

if you want to see the "main lan" you must run your dns server and WINS server so windows client can see the main lan , you install on windows server it is simple to install dns and wins server so everything will work for you ,

Post Reply