Page 1 of 1

OpenVPN Local Lan Access

Posted: Sun Aug 16, 2020 4:25 pm
by manjotsc
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.

Re: OpenVPN Local Lan Access

Posted: Sun Aug 16, 2020 4:51 pm
by Pippin
Read here first:
viewtopic.php?t=22603

Re: OpenVPN Local Lan Access

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

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

FastestVPN

Posted: Sun Aug 16, 2020 8:27 pm
by manjotsc

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

Re: OpenVPN Local Lan Access

Posted: Mon Aug 17, 2020 12:41 am
by TinCanTech
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 ..

Re: OpenVPN Local Lan Access

Posted: Mon Aug 17, 2020 9:55 am
by 300000
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.

Subnets

Posted: Mon Aug 17, 2020 2:12 pm
by manjotsc
192.168.40.0
192.168.80.0
These are the ones, I want to access.

Re: OpenVPN Local Lan Access

Posted: Mon Aug 17, 2020 4:47 pm
by 300000
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

Re: OpenVPN Local Lan Access

Posted: Tue Aug 18, 2020 9:34 am
by manjotsc
Thanks it works, but it give this error =

Code: Select all

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