-connects me to ProtonVPN
-changes my dns from ProtonVPNs dns to Pi-hole’s dns (127.0.0.1)
-enables redshift
in just one command.
alias vpn='protonvpn-cli connect JP-FREE#2 -p udp && protonvpn-cli s'
alias vpnpi='vpn && cat /home/soumi/Fcxt-3001/pi_dns.txt >> /etc/resolv.conf'
alias startup='vpnpi && redshift -P -O 4250'
However, when I try to run it, it throws me the error zsh: permission denied: /etc/resolv.conf when it reaches the part where it’s supposed to edit /etc/resolv.conf. How can I fix this?
This is what’s inside my pi_dns.txt file
~ » cat '/home/soumi/Fcxt-3001/pi_dns.txt' soumi@Hori
# pi-hole dns
nameserver 127.0.0.1
@soumi why not just configure the nameserver and ProtonVPN in KDE’s network manager?
There’s an override named Automatic (address only) in which you specify the nameserver IP address when you configure ProtonVPN in the KDE Network Manager.
You probably could but doing so defeats the purpose of a VPN - the purpose being to channel all traffic through the VPN endpoint.
If you do what OP tries the Pihole will resolve all queries outside the VPN - leaking the public IP of the PiHole whether this the same computer or a raspberry pi.
Which traffic would leak outside the VPN? It appears that Pi-hole is running on the same computer. Wouldn’t using Network Manager (with the advanced options) essentially route all traffic through ProtonVPN, and DNS requests direct to 127.0.0.1?
I am using Pi-hole on the same laptop via docker and has quad9 as it’s sub dns. As of now, I don’t have the money to subscribe to protonVPN plus…I live in a third world country so ya. The main reason why I use a VPN is so I can watch region blocked content in Crunchyroll and Funimation. If that helps. Thank you for the help. I tried it and it worked.