Page 1 of 1

Setup PiVPN to bridge with my Home router

Posted: Wed Oct 16, 2019 9:52 pm
by aryeduino
Hi All,

I have set up my PiVPN and I want it to be a bridge with my Home Router that it will give addresses to VPN connection from the same scope as my Router and preventing IP Conflicts.

I have Network of Class C
and I would be happy if the PiVPN provides IP addresses from that scope as well.

I have used the Server configuration for Class A and it works - that means (as far as I see it) that the PiVPN works OK and provide IP for VPN connection.
As I have mentioned above I want it to bind with my Router Clients list and Provide only FREE IP addresses to the VPN Connections.

Please assist me on how to do that.
I have been trying hard with configurations and not being able to figure out what is the CORRECT configuration I need.


Re: Setup PiVPN to bridge with my Home router

Posted: Thu Oct 17, 2019 10:40 pm
by default_user8
I understand what you are asking, I just can't figure out why you are asking. I used the pivpn setup script and I am able to use any resource on my network when i'm connect to my pivpn(Nextcloud, Plexmediaserver, network printer). Are you having an issue with a resource that you need to access and hence think you need your vpn connections in the same ip range? It may be possible to do what you want, but you'd need something besides your router to be a DHCP server, and you'd need to set your router up as a DHCP forwarder(see pihole documentation for more information). You may need to provide more information on what it is you are trying to accomplish.

Re: Setup PiVPN to bridge with my Home router

Posted: Sat Oct 19, 2019 11:00 pm
by aryeduino
Thanks for your reply.
I am not sure I understand what you are trying to explain since it do not think I have reached that step already.
I have a Brand new installation of PiVPN and I want to be alre to use it (using duckdns) from out side the network and to get IP.
I have not been able to set it correctly at all.
I have added server 10.0.10.xx to the configuration and I was able to connect from OUTSIDE and I got IP (i.e) - can I connect using that IP to my LAN using the network?
Please assist. thank you

Re: Setup PiVPN to bridge with my Home router

Posted: Sun Oct 20, 2019 3:47 am
by default_user8
This is my server.conf file:
dev tun
proto udp
port "redacted"
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server_"redacted".crt
key /etc/openvpn/easy-rsa/pki/private/server_"redacted".key
dh none
topology subnet
# Set your primary domain name server address for clients
push "dhcp-option DNS"
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

When i start my connection from my phone or tablet outside my home network it's like I'm connected to my home wifi. So to answer your question, even though my virtual op is, i can type in any local ip and access local resources.

This is what my pivpn -c looks like while connected.
::: Client Status List :::
Bytes Bytes
Name Remote IP Virtual IP Received Sent Connected Since
HTC "redacted" 12KiB 16KiB Oct 19 2019 - 22:48:50

Hope this helps.

Re: Setup PiVPN to bridge with my Home router

Posted: Wed Nov 06, 2019 4:36 am
by maverik0106
I'm going to go on a limb here and say that maybe there's some specific uses where certain resource at home/office requires the local IP range... in his case it could be a specific resource needs to see his computer as a whereas as you're pointing it out you could technically just access any info from the one client.

Re: Setup PiVPN to bridge with my Home router

Posted: Thu Nov 07, 2019 11:01 pm
by dorian-ny
Any particualar reason you want to give them all ip's on both networks instead of just masquarading traffic from your private network to the vpn.
It is not like they are giving you routable ip's, it is just their private network adresses