How to setup DNS on Ubuntu?
How to setup DNS on Ubuntu?
Hello,
I'm new here, it seems that on Ubuntu when I connect to the VPN the DNS leaks, how do I fix that? how to make sure I'm using cryptostorm DNS servers?
Thanks
I'm new here, it seems that on Ubuntu when I connect to the VPN the DNS leaks, how do I fix that? how to make sure I'm using cryptostorm DNS servers?
Thanks
Re: How to setup DNS on Ubuntu?
@OP
Can you post the content of /etc/resolv.conf? Thanks.
EDIT
Copy this into a script file and then execute it - see if it fixes your issue.
Can you post the content of /etc/resolv.conf? Thanks.

EDIT
Copy this into a script file and then execute it - see if it fixes your issue.

Re: How to setup DNS on Ubuntu?
Thanks for the reply, I've ran that script but sadly I'm still experiencing the same issue.parityboy wrote:@OP
Can you post the content of /etc/resolv.conf? Thanks.
EDIT
Copy this into a script file and then execute it - see if it fixes your issue.
the content of my resolv.conf is: nameserver 127.0.0.53
just that
Thanks
Re: How to setup DNS on Ubuntu?
@OP
OK, so that's wrong. It should read 127.0.0.1.
OK so do the following:
The result should be (based on what you've told me)
Edit it so that the address is 127.0.0.1, then run sudo resolvconf -u. Now do
The output should be
If it isn't, edit it. Then reboot, and see if you get the same problem. 
OK, so that's wrong. It should read 127.0.0.1.

Code: Select all
cd /etc/resolvconf/resolv.conf.d
cat head
Code: Select all
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.53
Code: Select all
cd /etc/NetworkManager/dnsmasq.d
cat dnsmasq.conf
Code: Select all
listen-address=127.0.0.1

Re: How to setup DNS on Ubuntu?
Sadly I'm still seeing Google DNS servers instead of CS DNS after following your instructions :/parityboy wrote:@OP
OK, so that's wrong. It should read 127.0.0.1.OK so do the following:
~
If it isn't, edit it. Then reboot, and see if you get the same problem.
Re: How to setup DNS on Ubuntu?
@OP
When I connect, I get this in /var/log/syslog
Can you do sudo tail -f /var/log/syslog, connect and then post the log entries here so that we can see what's going on? Thanks.
When I connect, I get this in /var/log/syslog
Code: Select all
Jun 21 22:35:53 defiant nm-openvpn[11445]: [server] Peer Connection Initiated with [AF_INET]5.101.137.252:443
Jun 21 22:35:56 defiant nm-openvpn[11445]: TUN/TAP device tun0 opened
Jun 21 22:35:56 defiant nm-openvpn[11445]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper tun0 1500 1602 10.33.196.122 255.255.0.0 init
Jun 21 22:35:56 defiant NetworkManager[1148]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/tun0, iface: tun0)
Jun 21 22:35:56 defiant NetworkManager[1148]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found.
Jun 21 22:35:56 defiant NetworkManager[1148]: <warn> /sys/devices/virtual/net/tun0: couldn't determine device driver; ignoring...
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> VPN connection 'CS ENG' (IP Config Get) reply received.
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> VPN connection 'CS ENG' (IP4 Config Get) reply received.
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> VPN Gateway: 5.101.137.252
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Tunnel Device: tun0
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> IPv4 configuration:
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Internal Gateway: 10.33.0.1
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Internal Address: 10.33.196.122
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Internal Prefix: 16
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Internal Point-to-Point Address: 0.0.0.0
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Maximum Segment Size (MSS): 0
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Forbid Default Route: no
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> Internal DNS: 5.101.137.251
Jun 21 22:35:56 defiant nm-openvpn[11445]: Initialization Sequence Completed
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> DNS Domain: '(none)'
Jun 21 22:35:56 defiant NetworkManager[1148]: <info> No IPv6 configuration
Jun 21 22:35:57 defiant NetworkManager[1148]: <info> VPN connection 'CS ENG' (IP Config Get) complete.
Jun 21 22:35:57 defiant NetworkManager[1148]: <info> Policy set 'CS ENG' (tun0) as default for IPv4 routing and DNS.
Jun 21 22:35:57 defiant NetworkManager[1148]: <info> Writing DNS information to /sbin/resolvconf
Jun 21 22:35:57 defiant dnsmasq[2922]: setting upstream servers from DBus
Jun 21 22:35:57 defiant dnsmasq[2922]: using nameserver 5.101.137.251#53
Re: How to setup DNS on Ubuntu?
The problem here is that the update-resolv-conf script needs to be added to the OpenVPN configs.
https://cryptostorm.is/nix#dnsleak has the instructions
https://cryptostorm.is/nix#dnsleak has the instructions