OpenVPN Local Lan Access

This forum is for general conversation and user-user networking.

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

Post Reply
manjotsc
OpenVpn Newbie
Posts: 8
Joined: Sun Oct 21, 2018 4:16 am

OpenVPN Local Lan Access

Post by manjotsc » Sun Aug 16, 2020 4:25 pm

I am connecting to VPN using openvpn on ubuntu command line " openvpn --config /vpn/UDP_Files/Canada-UDP.ovpn ". When I am connected to vpn I lose access local lan network, I want to be able to connect to VPN and maintain access to local lan.

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

Re: OpenVPN Local Lan Access

Post by Pippin » Sun Aug 16, 2020 4:51 pm

Read here first:
viewtopic.php?t=22603
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

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

Re: OpenVPN Local Lan Access

Post by TinCanTech » Sun Aug 16, 2020 6:52 pm

Post your client log at --verb 4 in Off-Topic.

Include the name of the VPN provider in the Subject field.

manjotsc
OpenVpn Newbie
Posts: 8
Joined: Sun Oct 21, 2018 4:16 am

FastestVPN

Post by manjotsc » Sun Aug 16, 2020 8:27 pm

Code: Select all

root@Torrent:~# openvpn --config /vpn/UDP_Files/Canada-UDP.ovpn
Sun Aug 16 16:26:10 2020 WARNING: file '/vpn/UDP_Files/userpass.txt' is group or others accessible
Sun Aug 16 16:26:10 2020 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  5 2019
Sun Aug 16 16:26:10 2020 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Sun Aug 16 16:26:10 2020 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sun Aug 16 16:26:10 2020 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sun Aug 16 16:26:10 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]158.69.26.75:4443
Sun Aug 16 16:26:10 2020 UDP link local: (not bound)
Sun Aug 16 16:26:10 2020 UDP link remote: [AF_INET]158.69.26.75:4443
Sun Aug 16 16:26:10 2020 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sun Aug 16 16:26:10 2020 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1602', remote='link-mtu 1570'
Sun Aug 16 16:26:10 2020 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1532', remote='tun-mtu 1500'
Sun Aug 16 16:26:10 2020 [*.fastestvpn.co] Peer Connection Initiated with [AF_INET]158.69.26.75:4443
Sun Aug 16 16:26:12 2020 Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:5: register-dns (2.4.7)
Sun Aug 16 16:26:12 2020 TUN/TAP device tun0 opened
Sun Aug 16 16:26:12 2020 Note: Cannot set tx queue length on tun0: Operation not permitted (errno=1)
Sun Aug 16 16:26:12 2020 /sbin/ip link set dev tun0 up mtu 1500
Sun Aug 16 16:26:12 2020 /sbin/ip addr add dev tun0 10.109.16.9/24 broadcast 10.109.16.255
Sun Aug 16 16:26:12 2020 Initialization Sequence Completed

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

Re: OpenVPN Local Lan Access

Post by TinCanTech » Mon Aug 17, 2020 12:41 am

TinCanTech wrote:
Sun Aug 16, 2020 6:52 pm
Post your client log at --verb 4 in Off-Topic.

Include the name of the VPN provider in the Subject field.
Verb 4 ..

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

Re: OpenVPN Local Lan Access

Post by 300000 » Mon Aug 17, 2020 9:55 am

What is your lan subnet address? How many subnet on your lan you want to access when you connect to openvpn? Let write it down and post on here i can help you make it access when you connected to oprnvpn.

manjotsc
OpenVpn Newbie
Posts: 8
Joined: Sun Oct 21, 2018 4:16 am

Subnets

Post by manjotsc » Mon Aug 17, 2020 2:12 pm

192.168.40.0
192.168.80.0
These are the ones, I want to access.

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

Re: OpenVPN Local Lan Access

Post by 300000 » Mon Aug 17, 2020 4:47 pm

you add two line on your client config and connect again . it shoul let you connect to your local lan and openvpn connection.


route 192.168.40.0 255.255.255.0 net_gateway
route 192.168.80.0 255.255.255.0 net_gateway

manjotsc
OpenVpn Newbie
Posts: 8
Joined: Sun Oct 21, 2018 4:16 am

Re: OpenVPN Local Lan Access

Post by manjotsc » Tue Aug 18, 2020 9:34 am

Thanks it works, but it give this error =

Code: Select all

ERROR: Linux route add command failed: external program exited with error status: 2

Post Reply