1

We're using an OpenVPN server on AWS which we configured using this tutorial. However, when we connect to the VPN the internet does not seem to work, because the DNS is not resolving anything. When we switch the DNS to 8.8.8.8 in the configuration panel, everything works as expected.

We've tried reinstalling everything from scratch, but the problem remains the same. We used the standard AWS AMI template for OpenVPN provided by AWS.

Our DNS is:

nameserver[0] : 172.31.0.2
nameserver[0] : 172.31.0.2

When I ping this IP this is the response:

Request timeout for icmp_seq 0
ping: sendto: No route to host

I've executed some commands to provide more information:

dig @127.0.0.1 google.com

; <<>> DiG 9.11.3-1ubuntu1.17-Ubuntu <<>> @127.0.0.1 google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

dig google.com

; <<>> DiG 9.11.3-1ubuntu1.17-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45371
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             124     IN      A       142.250.185.238

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Jul 19 07:30:15 UTC 2022
;; MSG SIZE  rcvd: 55
KittyCat
  • 415
  • 4
  • 9
  • 26
  • Obvious question: is your Amazon OpenVPN running a DNS server? On the server itself, try something like `dig @127.0.0.1 google.com` – Barry Carter Jul 18 '22 at 14:30
  • @barrycarter Thank you for your comment. I added more information to the post as you requested. – KittyCat Jul 19 '22 at 07:57
  • I just realized something: 172.31.0.2 is in private IP space. I'm pretty sure you need to use the public IP of the DNS server unless you have some other sort of tunnel set up. – Barry Carter Jul 19 '22 at 15:02

0 Answers0