DNS issue after upgrading to Ubuntu 16.04 - dns

I recently upgraded my virtual machines to Ubuntu 16.04 LTS from 14.04 LTS and couldn't get DNS to work.
nsloookup
;; connection timed out; no servers could be reached
Tried the following but still the issue is there:
https://willhaley.com/blog/resolvconf-dns-issue-after-ubuntu-xenial-upgrade/
http://www.ubuntugeek.com/fix-for-dns-problems-after-upgrading-from-ubuntu-16-04-to-ubuntu-16-10.html
something to add here.
ok something to add here.
I set up a tcp dump on the my machine with
sudo tcpdump -n -i eth0 | grep xx.xx.xx.xx.53 (where xx.xx.xx.xx is the ip address of the proxy server)
I don't get a response back as below
21:29:55.150092 IP yy.yy.yy.yy.37459 > xx.xx.xx.xx..53: 4219+ [1au] A? www.google.com. (43)
21:30:00.150044 IP yy.yy.yy.yy.37459 > xx.xx.xx.xx..53: 4219+ [1au] A? www.google.com. (43)
21:30:05.150172 IP yy.yy.yy.yy.37459 > xx.xx.xx.xx..53: 4219+ [1au] A? www.google.com. (43)
Firewall rules seems to be fine.
Any help would be greatly appreciated.

Ok I get it working now. The main issue was, the latest version of dnsmasq on Ubuntu 16.04 by default only allows responses within the same subnet, in order to allow multiple subnets I need to add
interface=*
to my /etc/dnsmasq.d/10-local-dns-server file.
This resolved the issue.

Related

ping: unknown host in Centos 6.6

It's OK to ping IP address.
picture about ping and cat /etc/resolve.conf
I can ping 8.8.8.8, so the DNS server is OK to reach, and /etc/resolv.conf edited correctly. But I just can't ping domain. I've tried shutdown firewall but failed. Too strange, I used service iptables stop and iptables was still there.
Two problems:
1. unknown host
2. stop iptables failed.
Anyone can tell me how to fix these?
I solved this problem by accident and I don't know if it's copyable, but I need to write it down.
1. I set /etc/hosts to run command `yum install bind-utils`.
2. then, I run command `dig +trace www.baidu.com` to find out why ping fail.
then, miracle happens. I can ping domain again. The problem solved magically just as it occurred.

gnome network manager: no internet, ping works, dig #8.8.8.8 works

Running opensuse tumbleweed with 4.7.5-1-default kernel and gnome.
Network managed with gnome's network-manager. Network (wired and wireless) connect to my router.
ping works also to external IPs
dig works if I provide the dns ip (eg. 8.8.8.8)
nmcli dev show | grep DNS shows the right nameservers (which I set in
the network managers interface): 8.8.8.8 and 8.8.4.4,
but dig without specification of the dns IP does not work
ping etc. to internet names (e.g. google.com) does not work.
Am completely lost by now. Help greatly appreciated.
(Matt stated the solution in his comment but I failed to understand it.)
Solution found on opensuse forum: the /etc/resolve.conf file was corrupted (empty). After deleting it and rebooting, the system (network-manager?) generated a new, working version. It contains the ip of the nameserver.

Unknown host connecting to internet in ubuntu

I tried to connect to my wifi network but i am not able to connect through my laptop .My other device at home are able to connect to internet. I am using ubuntu 16.04 LTS . I set my browser proxy to no proxy . I have no antivirus installed .
I tried to ping -c 5 (google .com and facebook.com) in terminal its showing unknown host google.com and unknown host facebook.com and tried to install eclipse while downloading it shows error java error unknown host .
Please help me to solve this issue.
Sounds like DNS may not have been configured when you connected to the network. This should normally happen automatically, but you can check by looking at the file /etc/resolv.conf. There should be at least one line in the file containing nameserver and an IP address.
If there are no nameserver lines, or if there's only one and it says nameserver 127.0.0.1, then you can try to use Google's public DNS by adding the line nameserver 8.8.8.8 (replacing the 127.0.0.1 if that's present).
Like everyone, I had to face this issue. So what did I do to address this issue?
1) I configured my Ubuntu server to have two network interfaces (NAT and Intnet).
2) In /etc/network/interfaces , I added the following lines:
auto enp0s8
iface enp0s8 inet static
address 192.168.10.23
dns-nameservers 8.8.8.8 8.8.4.4
3) Restarted the network - /etc/init.d/networking restart
Result: ping google.com worked.
I hope this helps you in resolving this issue :)

forticlientsslvpn doesn't work with a proxy on Cent OS 7

I'd like to use forticlientsslvpn on Cent OS 7 through a proxy but it doesn't work with a message "Can not connect to proxy" or "Can not resolve proxy address". I guess it needs some dependent libraries but I don't know them.
I downloaded the latest Forticlient SSLVPN 4.4.2329-1 64bit from here. (I installed it on debian then copied the forlder(/opt/forticlientsslvon) to the clean Cent OS 7.)
Both forticlientsslvpn CLI and GUI failed on the same error. This is the result of the cli command.
[root#cent7 /]# cd ~/forticlient-sslvpn/64bit/
[root#cent7 /]# ./forticlientsslvpn_cli --proxy 10.0.0.73:3128 --server 203.0.113.1:10443 --vpnuser myuser
Password for VPN:
STATUS::Setting up the tunnel
STATUS::Connecting...
NOTICE::Can not connect to proxy.
STATUS::Set up tunnel failed
SSLVPN down unexpectedly with error:2
Press Ctrl-C to quit
Clean up...
# Another proxy variable
[root#cent7 /]# ./forticlientsslvpn_cli --proxy http://10.0.0.73:3128 --server 172.17.97.85:10443 --vpnuser myuser
Password for VPN:
08/19/2016 18:19:26 [23461] can not resolve name http://10.0.0.73
Init SSLVPN error:Can not resolve proxy address
# Check the proxy connection
[root#cent7 /]# telnet 10.0.0.73 3128
Trying 10.0.0.73...
Connected to 10.0.0.73.
Escape character is '^]'. # OK
# Check DNS
[root#cent7 /]# nslookup 10.0.0.73
Server: 10.0.0.70
Address: 10.0.0.70#53
Non-authoritative answer:
73.0.0.10.in-addr.arpa name = dns.example.com.
Of cource my forticlient on windows in the same network works with the proxy to the server. And FireFox/wget on this Cent OS 7 server works with the proxy. Does anyone know anything about "Can not connect to proxy" error?
My IP was wrong and needed ip route add
Although the error message was "Can not connect to proxy", my destination forti IP was wrong. It was connected after I fixed it.
One more thing, I noticed a confusing point. I have two proxies like a socks proxy and a web proxy at this time. I knew ssl-vpn uses only web connections but I guessed forticlient might use ssh command during the connection. But it didn't. Forticlient_sslvpn needs only a web proxy so we just need to fill the proxy form of forticlient with a web proxy's url.
And one more thing. After I connected to ssl-vpn, it doesn't work perfectly because I can ping to internal server but not to DMZ(Of course my windows forticlient works well for both). I added ip route to DMZ and it started to work.
ip route add 192.168.3.0 via 10.0.0.5
I guessed this GW 10.0.0.5 is not the same everytime and every machine so I made the dynamic command.
ip route add 192.168.3.0/24 via $(ip route | grep 10.0.0 | awk '{print $3}' | head -1)
I hope this helps someone.

DNSclient is not picking up hostname from DNSserver but it is able to ping it

I Have Window 7 as Host Machine and I have installed Redhat 5.3 and Centos 5.4 as Vmware Machines under Window 7 through Vmware Workestation.I configure DNS & DHCP in Redhat 5.3(10.0.0.1) and able to do nslookup & DIG in this.I am able to ping window 7,redhat,centos with each other.
I have made one entry client30.example.com for ip 10.0.0.30 in forword and backword lookup file in DNS server(10.0.0.1).
Problem :-
Centos whom i have made dhcp client of Redhat(10.0.0.1) is able to get ip from dhcp server and it gets ip 10.0.0.30 (as i wanted no problem till now)
But Centos is not picking up hostanme client30.example.com as i have bind entry of ip 10.0.0.30 with client30.example.com.
Still it is picking up hostname localhost.localdomain. I check /etc/resolve.conf file of centos and i found that by default it picks nameserver 192.168.1.1(even i have not provided this ip anywhere).Everytime i made manual change in this ip again it pics same ip on reboot.
Kindly help how i can resolve this problem.
Because VMware Workstation is itself DHCP. Please disable DHCP in VMware Workstation, You can't run two DHCP in single network subnet.
Also check /etc/sysconfig/network file, Hostname coming from there.

Resources