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