PiVPN - possible to connect, but no internet Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
JohnDoeFR
Posts: 29
Joined: Tue Sep 22, 2020 6:04 pm

Re: PiVPN - possible to connect, but no internet

Post by JohnDoeFR »

Thanks for your reply, I've encountered a new problem, my ISP dress is "rotating" every week... :lol: I'm screwed
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: PiVPN - possible to connect, but no internet

Post by Joulinar »

Do you mean you external IP address is going to change every week? Well, that's not a problem as you can use a DDNS service to be able to reach your system from externel/internet using the same URL always.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
JohnDoeFR
Posts: 29
Joined: Tue Sep 22, 2020 6:04 pm

Re: PiVPN - possible to connect, but no internet

Post by JohnDoeFR »

Yes it is changing like a new IP. I'm going to read about DDNS because I never heard about it.
But how can it work if my IP is changing ?
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: PiVPN - possible to connect, but no internet

Post by Joulinar »

that's exactly the purpose of a DDNS (DynDNS) provider to ensure are reachable under a specific domain even if your IP address is changing ;)

Usually privat internet router offering a couple DDNS providers already. Activating this feature will give you an own domain like www.your.name.ddns.com :) This can be used to reach your systems from internet.

There are a couple of free DDNS provider available. No need for a paid service.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
JohnDoeFR
Posts: 29
Joined: Tue Sep 22, 2020 6:04 pm

Re: PiVPN - possible to connect, but no internet

Post by JohnDoeFR »

Ok thanks, I've seen that "NoIP" is quite recommended by French forum, so I will learn on the function and I've seen a No-IP in Dietpi-software, I'm in good way.

Since there is a problem because of the VPN, is it the same prob if I want to have a device only on PiHole but not on the VPN ?

Thanks
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: PiVPN - possible to connect, but no internet

Post by Joulinar »

if you go for NoIP, keep in mind that you need to login to NoIP website once a month to keep your account active. ;)

Regarding the VPN. I guess all devices are using PiHole but just some of them you just like to route to the VPN. There it get's more complex as you than need to specify depending on the source device what to do.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
JohnDoeFR
Posts: 29
Joined: Tue Sep 22, 2020 6:04 pm

Re: PiVPN - possible to connect, but no internet

Post by JohnDoeFR »

Hi there,

So yes, I can confirm, when the VPN is ON and No-IP running I can't access it from outside. I've double check the firewall and NAT routing, but nothing.

Do you have an idea to just keep no-ip and next cloud outside the VPN ? Or it's a too crazy ?

Thanks
User avatar
MichaIng
Site Admin
Posts: 2324
Joined: Sat Nov 18, 2017 6:21 pm

Re: PiVPN - possible to connect, but no internet

Post by MichaIng »

You even must bypass the VPN with the No-IP client, otherwise the No-IP domain will point to the NordVPN IP instead of your actual servers IP ;). E.g. you could run the No-IP service with a specific user or group (actually it does not need to run as root as it does currently) and then give all packets send by this users a mark that uses a bypass routing table, like trendy did above but based on user/owner. This guide shows how to do it the other way round, so only packets from a specific user are sent through the tunnel, but the principles are the same: https://www.niftiestsoftware.com/2011/0 ... interface/

In case of Nextcloud it's the webserver user www-data for which you can do similar, or you run the No-IP client as www-data user and create the bypass rules for this one only.

A bid late today to write the exact steps together and it should be found already somewhere in the forum, I'll have a closer look tomorrow :).
JohnDoeFR
Posts: 29
Joined: Tue Sep 22, 2020 6:04 pm

Re: PiVPN - possible to connect, but no internet

Post by JohnDoeFR »

Ok I see :)
That's why I was reading that the "best" option is to use a VPN with Port Forwarding/DDNS option, that way we can still use VPN on all the traffic if I'm right.

I'm going to read your link if I can handle it :lol:

Thanks !
JohnDoeFR
Posts: 29
Joined: Tue Sep 22, 2020 6:04 pm

Re: PiVPN - possible to connect, but no internet

Post by JohnDoeFR »

Will it be easier with another Raspberry ?
I've seen that he created an account for "vpnuser" if I'm right, but understand it well
Post Reply