I am trying to get IP from my main router, not from openvpn

Scripts to manage certificates or generate config files
Post Reply
OpenVpn Newbie
Posts: 2
Joined: Fri Dec 06, 2019 4:53 pm

I am trying to get IP from my main router, not from openvpn

Post by Dreikana » Fri Dec 06, 2019 7:24 pm


I have a Raspberry Pi at home with pivpn installed and when I connect to the VPN it works fine when connecting to internet. However, I can't connect to my LAN, for example to access to my NAS.

When I connect my I get the IP which is outside from my LAN addressing, How can I solve that??


dev tun
proto udp
port 1195
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/file.crt
key /etc/openvpn/easy-rsa/pki/private/file.key
dh none
topology subnet
# Set your primary domain name server address for clients
push "dhcp-option DNS"
push "dhcp-option DNS"
# Prevent DNS leaks on Windows
push "block-outside-dns"
# Override the Client default gateway by using and
# rather than This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
keepalive 1800 3600
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user nobody
group nogroup
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
verb 3
#DuplicateCNs allow access control on a less-granular, per user basis.
#Remove # if you will manage access by user instead of device.
# Generated for use by PiVPN.io

Post Reply