Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS issues after reboot #265

Closed
abbasnaqdi opened this issue Jul 28, 2018 · 16 comments
Closed

DNS issues after reboot #265

abbasnaqdi opened this issue Jul 28, 2018 · 16 comments

Comments

@abbasnaqdi
Copy link

Hello . This script works for me and I have no problem.
After restart, the openvpn service runs and has no problems.

I can connect to open-vpn with the client , but it does not work and does not open any website and does not show any errors.

OS : Ubuntu 18.4
Kernel : 4.15.18-1

what's wrong ?

@abbasnaqdi
Copy link
Author

@cezar97 : I tried the solutions that were in these issues, but my problem was not resolved.
All my firewalls are disabled .

I tried various configurations, but after restarting open-vpn does not work.

@abbasnaqdi
Copy link
Author

I noticed that there is a problem with DNS.
I can get a ping from the IP address of different sites, but I do not have the ability to ping the domain.

what is the problem?

@abbasnaqdi
Copy link
Author

abbasnaqdi commented Aug 7, 2018

This problem is solved by solving the following:

edit this file :
/etc/openvpn/server.conf

Add these commands at the end of this file :

up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Run the following command:
service openvpn restart

@angristan
Copy link
Owner

Is /etc/openvpn/update-resolv-conf an actual file?

What DNS server were you using when you had the issue? What OS and client?

@angristan angristan changed the title problem after reboot DNS issues after reboot Aug 18, 2018
@ayrat555
Copy link

ayrat555 commented Aug 27, 2018

I have the same issue after reboot ubuntu 16.04

@ayrat555
Copy link

@angristan I tried https://github.com/Nyr/openvpn-install and it works after reboot

@iProdigy
Copy link
Contributor

@ayrat555 Did you try to use the system resolver (option #1 for DNS in the script)?

@gonebeta
Copy link

Yeah, I had the same issue. reinstalled 3 times and each time, after reboot it stops working. I can connect to the server but no site would open.

@gonebeta
Copy link

@iProdigy yes, I'm using the system resolver ( I also just tried it on two other vps server with the same result- no internet after reboot).

@iProdigy
Copy link
Contributor

@gonebeta Can you try pinging 1.1.1.1 with the VPN enabled to ensure it's not DNS?
If that's unable to connect, can you post the output of sudo ufw status?

@gonebeta
Copy link

Thanks. It says ping statistics for 1.1.1.1:
packets: sent 4, received 0 (100% loss).
Even while that is happening, I'm able to login to the server and some other vps servers. discord and skype were also working.

For good measure, I turn off my antivirus firewall ... didn't help.
I don't use ufw on the servers ( all firewall are configured in runcloud and I opened the udp port the vpn uses).

I installed Nyr version and it works fine even after reboots.

@angristan
Copy link
Owner

angristan commented Sep 16, 2018

If someones still encounters the issue, please tell us:

  • What DNS servers are pushed by the server (/etc/openvpn/server.conf)
  • What DNS the client is trying to use (using dig on Linux/macOS or nslookup on Windows)

@ayrat555
Copy link

Nice fix

@angristan
Copy link
Owner

angristan commented Sep 17, 2018

Until I have useful information, yes it is.

I will reopen if needed

@romandobra
Copy link

What DNS servers are pushed by the server
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

What DNS the client is trying to use
SERVER: 127.0.0.53#53(127.0.0.53)

@dmrbatuhan
Copy link

Hello,
I have Ubuntu 20.04 LTS server. I think this issue still continues. I've installed OpenVPN server with your script, everything works well. After reboot, clients can connect to the server, but can not connect to the web pages.
Here is /etc/openvpn/server.conf file content with the solution you wrote, end of this file, also i chose CloudFlair DNS while installing VPN:

port 1194
proto udp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key
crl-verify crl.pem
ca ca.crt
cert server_je3oGt6CJdgAcsY0.crt
key server_je3oGt6CJdgAcsY0.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants