mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Old QA team was fired. New team found this issue
with DNS not being set if you non default and were not root user.
This commit is contained in:
parent
c7caf8db35
commit
582e923bc8
1 changed files with 8 additions and 8 deletions
|
@ -460,22 +460,22 @@ setClientDNS() {
|
||||||
echo "::: Using OpenDNS servers."
|
echo "::: Using OpenDNS servers."
|
||||||
OVPNDNS1="208.67.222.222"
|
OVPNDNS1="208.67.222.222"
|
||||||
OVPNDNS2="208.67.220.220"
|
OVPNDNS2="208.67.220.220"
|
||||||
sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
||||||
sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
||||||
;;
|
;;
|
||||||
Level3)
|
Level3)
|
||||||
echo "::: Using Level3 servers."
|
echo "::: Using Level3 servers."
|
||||||
OVPNDNS1="209.244.0.3"
|
OVPNDNS1="209.244.0.3"
|
||||||
OVPNDNS2="209.244.0.4"
|
OVPNDNS2="209.244.0.4"
|
||||||
sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
||||||
sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
||||||
;;
|
;;
|
||||||
Norton)
|
Norton)
|
||||||
echo "::: Using Norton ConnectSafe servers."
|
echo "::: Using Norton ConnectSafe servers."
|
||||||
OVPNDNS1="199.85.126.10"
|
OVPNDNS1="199.85.126.10"
|
||||||
OVPNDNS2="199.85.127.10"
|
OVPNDNS2="199.85.127.10"
|
||||||
sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
||||||
sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
||||||
;;
|
;;
|
||||||
Custom)
|
Custom)
|
||||||
until [[ $DNSSettingsCorrect = True ]]
|
until [[ $DNSSettingsCorrect = True ]]
|
||||||
|
@ -507,8 +507,8 @@ setClientDNS() {
|
||||||
else
|
else
|
||||||
if (whiptail --backtitle "Specify Upstream DNS Provider(s)" --title "Upstream DNS Provider(s)" --yesno "Are these settings correct?\n DNS Server 1: $OVPNDNS1\n DNS Server 2: $OVPNDNS2" $r $c) then
|
if (whiptail --backtitle "Specify Upstream DNS Provider(s)" --title "Upstream DNS Provider(s)" --yesno "Are these settings correct?\n DNS Server 1: $OVPNDNS1\n DNS Server 2: $OVPNDNS2" $r $c) then
|
||||||
DNSSettingsCorrect=True
|
DNSSettingsCorrect=True
|
||||||
sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
||||||
sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
$SUDO sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf
|
||||||
else
|
else
|
||||||
# If the settings are wrong, the loop continues
|
# If the settings are wrong, the loop continues
|
||||||
DNSSettingsCorrect=False
|
DNSSettingsCorrect=False
|
||||||
|
|
Loading…
Reference in a new issue