Cannot access other devices on network while connected to VPN

Need help configuring your VPN? Just post here and you'll get that help.

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
dKrier
OpenVpn Newbie
Posts: 2
Joined: Mon Aug 07, 2017 3:29 am

Cannot access other devices on network while connected to VPN

Post by dKrier » Mon Aug 07, 2017 7:10 pm

Would like to use my VPN to access my NAS among other things, but I am running into issues where I am not able to access it or any other devices on the network other than of course the VPN itself. Everything else works fine but would like to be able to connect to the NAS.

The NAS has an ip of 192.168.1.17

The server has an ip of 192.168.1.20

The ip I get when connecting to the VPN is 10.8.0.x

I have seen http://openvpn.net/index.php/open-sourc ... html#scope but am not sure hot to properly implement it. Any hep would be much appreciated.
server
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server.crt
key /etc/openvpn/easy-rsa/pki/private/server.key
dh /etc/openvpn/easy-rsa/pki/dh2048.pem
topology subnet
server 10.8.0.0 255.255.255.0
# server and remote endpoints
ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OPenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet
push "route 192.168.10.0 255.255.255.0"
# Set your primary domain name server address for clients
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
#push "route 192.168.1.0 255.255.255.0"
duplicate-cn
keepalive 10 120
tls-version-min 1.2
tls-auth /etc/openvpn/easy-rsa/pki/ta.key 0
cipher AES-256-CBC
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
log /var/log/openvpn.log
verb 1
# Generated for use by PiVPN.io
client
client
dev tun
proto udp
remote xxx.xxx.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
key-direction 1
remote-cert-tls server
tls-version-min 1.2
verify-x509-name server name
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 1
<ca>
-----BEGIN CERTIFICATE-----
Secret
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
Secret
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
Secret
-----END PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
Secret
-----END OpenVPN Static key V1-----
</tls-auth>

SuBaDiVeR
OpenVpn Newbie
Posts: 1
Joined: Thu Aug 10, 2017 6:29 am

Re: Cannot access other devices on network while connected to VPN

Post by SuBaDiVeR » Thu Aug 10, 2017 6:52 am

comment out line 14-16

these lines will redirect all your traffic to the openvpn

#push "dhcp-option DNS 8.8.8.8"
#5push "dhcp-option DNS 8.8.4.4"
#6push "redirect-gateway def1"

dKrier
OpenVpn Newbie
Posts: 2
Joined: Mon Aug 07, 2017 3:29 am

Re: Cannot access other devices on network while connected to VPN

Post by dKrier » Thu Aug 10, 2017 7:24 pm

This did not help. After doing this I was unable to even ping 192.168.1.1 (I was able to before) and couldn't even ssh into the server openvpn is hosted on... reverting to original settings... any other ideas?


Post Reply