Dietpi as openvpn client Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Dietpi as openvpn client

Post by przemko »

Hello, I have openvpn server and there I generate ovpn files for clients like smartphones and laptops. I install openvpn [apt install openvpn] and send one file to dietpi and set it to autostart. My Dietpi works with that vpn but there are problems with DNS and it works very slow and I cannot install apps or even open dietpi-software.
I took about 20 seconds to login:

Code: Select all

 ─────────────────────────────────────────────────────
 DietPi v6.34.3 : 22:37 - Sun 12/27/20
 ─────────────────────────────────────────────────────
 - Device model : RPi 2 Model B (armv7l)
 - CPU temp : 51'C : 123'F (Running warm, but safe)
 - LAN IP : 192.168.0.27 (eth0)
curl: (28) Resolving timed out after 2000 milliseconds
 ─────────────────────────────────────────────────────

Then I see that when start dietpi-software:

Code: Select all

FAILED] DietPi-Software | Checking DNS resolver
ping: dns9.quad9.net: Temporary failure in name resolution
When I generate .ovpn file I set google DNS. That files works on my smartphone and linux laptops. How to fix that?

Regards,
Przemek
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Dietpi as openvpn client

Post by przemko »

Hi @Joulinar I find Your post on github https://github.com/MichaIng/DietPi/issu ... -573453286 but I don't know I can change something now in dietpi.txt on /boot to fix my issue?

Code: Select all

# Enter your Static Network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=0
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=9.9.9.9
change DNS to 8.8.8.8?
Edit, I change in dietpi-config>network:Adapters>ethernet and now I cannot login with ssh.

Regards,
Przemek
User avatar
Joulinar
Posts: 3259
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi as openvpn client

Post by Joulinar »

These are AUTO_SETUP parameter part of DietPi-Automation settings and will be applied on first boot of DietPi only, ONCE! Changing them will have no effect on your system. Can you check your DNS server settings

Code: Select all

cat /etc/resolv.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Dietpi as openvpn client

Post by przemko »

Hi, thank again for answering me :D
Now when I change DNS in dietpi-config>network adpapters>ethernet to google, my Rpi2 wont start. I will burn image second time and install fresh dietpi. I will change before installation in dietpi.txt on /boot to 8.8.8.8 like above.
I will install openvpn [apt install openvpn] and start: `openvpn --config dietpi.ovpn`. Then when it works I will add that command to autostart. Do I have to move my file to /etv/openvpn/ folder?
Can You tell me some tips what to do also to make my .ovpn file to work?

Regards,
Przemek
User avatar
Joulinar
Posts: 3259
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi as openvpn client

Post by Joulinar »

I don't use OpenVPN at all. Probably you can check on some OpenVPN specialized boards how to configure it correctly.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Dietpi as openvpn client

Post by przemko »

Hi, it works now. My Rpi 2 IP changed. 😀
Post Reply