We are using local dns server and I need to single-label domains to be resolved in Fedora 33.
I edited /etc/systemd/resolved.conf, now it looks like this:
[Resolve]
#DNS=
#FallbackDNS=1.1.1.1 8.8.8.8 1.0.0.1 8.8.4.4 2606:4700:4700::1111 2001:4860:4860::8888 2606:4700:4700::1001 2001:4860:4860::8844
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=true
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes
ResolveUnicastSingleLabel=yes
but this was not helped.
You need to have systemd version 246 installed and then restart systemd-resolved:
sudo systemctl restart systemd-resolved
UPDATE I noticed that this indeed does not work in some cases. I've added a comment to the bug. It may work if you can set up DNS forwarding.
Related
I try to connect to the VPN with openvpn.
If I connect from the cli with sudo openconnect..... its working fine. The vpn change the /etc/resolv.conf to the desired format.
But If I would connect from the GUI. Settings > Network > VPN it doesn-t change the resolv.conf
The SELinux is in permissive mode
/etc/NetworkManager/NetworkManager.conf
Should contains the following setting
[main]
dns=dnsmasq
And everything will goes well. If you want to keep an ability to use internet during you are on vpn. Add the google dns (8.8.8.8) to the vpn settings aswel
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.
I have got installed CentOS 7 under virtual envirment.
It has proper hostname so I can ping it and it has acccess to internet inside of it and I can ping by IP and host name outside of it. Also It has working Apache and its test page is fine that has been checked locally.
Now I would like to get access to this test page from the MS Windows but I cannot. (I can ping CentOS by IP and hostname.)
Has it something to do with Iptables or firewall?
And this link doesnt help as well https://serverfault.com/questions/459267/enabling-http-access-on-port-80-for-centos-6-3-from-console
I assume some settings should be changed under CentOS but I am not sure which of them.
My question is which steps I have to execute to allow all those things?
Either disable firewalld.service
systemctl disable firewalld.service
systemctl stop firewalld.service
Or allow access to port 80
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
Also disable SELINUX:
setenforce 0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
So the answer is a simple one.
I just used Firewall settings to allow http and httpd.
How do I exclude DNS from the DHCP lease request on a Raspberry Pi?
I tried updating /etc/resolv.conf but it's reset after a while.
Reason: I am on a home network, and the home router uses itself as the DNS server, but the router's DNS service isn't working properly sometimes.
Most of the answers didn't work for me, but I found that this worked:
sudo vi /etc/dhcpcd.conf
Added a line (note that there is no comma):
static domain_name_servers=8.8.8.8 8.8.4.4
And unplugged and replugged my ethernet cable, which updates the resolver...
cat /etc/resolv.conf
Now shows:
# Generated by resolvconf
domain example.com
nameserver 8.8.8.8
nameserver 8.8.4.4
This also a better way to fix the problem where changes to /etc/resolv.conf are lost on reboot.
I asume the problem is, that the dhcpclient is getting new information about DNS servers with every dhcp-renewal. Add this line into /etc/dhcp/dhclient.conf:
option domain-name-servers 192.168.1.8, 8.8.8.8, 8.8.4.4
Of course you should replace the ip-addresses with the ones from your demanded DNS server. Probably restart the according service.
I have an issue with Docker not resolving my local DNS. Running even a basic ping will no longer work. Current version 0.11.1 running on Fedora 20. The last time I worked with docker (version 0.9) everything was fine.
sudo docker run base ping google.com
ping: unknown host google.com
My local DNS is resolving fine outside of Docker and I don't have localhost (127.0.0.1) set in my resolv.conf file. I have also tried setting the dns with the same outcome:
sudo docker run --dns=8.8.8.8 base ping google.com
ping: unknown host google.com
Any help would be greatly appreciated.
If anyone else has this issue I got it working by clearing out the iptables:
iptables -F
For a more permanent solution after restarting I listed the iptables before and after flushing but couldn't really see what was affecting it. I ended up loading the Firewall Configuration, and enabling the Masquerade zone worked. Not sure why this setting had changed or if a change in newer Docker versions now needed this to be set, but it works. Interestingly I had previously tried just enabling IP forwarding (sysctl -w net.ipv4.ip_forward=1), but this had no effect for me.