Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a Slackware 15.0 computer that was previously connected to an ASUS RT-AC66U B1 router with LAN IP 192.168.0.1. The Linux computer was able to connect to the Internet using 192.168.0.1 as the nameserver. The Linux IP was 192.168.0.2.
I moved that computer to a Netgear Nighthawk X4S R7800 with LAN IP 192.168.1.1. The linux computer now has IP 192.168.1.60. Now, I cannot resolve domain names using 192.168.1.1 as the nameserver, but I can do so using 8.8.8.8 or the ISP's nameserver:
The nameserver addresses 209.18.47.61 and 209.18.47.61 are configured in the Netgear as nameservers.
Why can I not resolve using the Netgear 192.168.1.1 address as the Linux host's nameserver, but I could do so with the ASUS? I think this is causing me other problems.
Typically a 192.168.1.0/24 network has a valid IP range of 192.168.1.1 - 192.168.1.254. It's common for the router address to be either at one end or the other i.e. x.x.x.1 or x.x.x.254. If the PC is configured for dhcp then it is also typical for nameserver default to the router's IP address. With systemd-resolved its common for the nameserver to be the pc itself since it acts like a dns stub listener.
Are you using dhcp or static ip address and is /etc/resolv.conf as 192.168.1.1? Is there any other settings in the router's dns configuration other then address? Does the pc's route show the router as the gateway.
Thanks for your responses. Network configuration continues the befuddle me even after years of doing lots of configs on lots of systems!
To (hopefully) reduce variables, both of the hosts involved have static IPs, netmask 255.255.255.0, gateway 192.168.1.1 (the router). No DHCP. Phones and laptops connecting to the router via wireless and DHCP have no problems resolving domain names.
Both host's Ethernet ports are connected together via a switch. They can each ssh to each other.
Here's my setup:
Code:
[Internet]
|
+-------------------------------+
| Netgear router |
| LAN IP 192.168.1.1 |
| DNS 209.18.47.61; 209.18.47.62|
+-------------------------------+
[ETH switch]
|
+---------------------+
| |
+----------------------+ +--------------+ +----------------------+
| HOST A | HOST B | | Windows VM on HOST B |
| 192.168.1.60 eth0 | | 192.168.1.58 |--| 192.168.1.180 |
| 192.168.1.12 wireless| | | | |
+----------------------+ +--------------+ +----------------------+
Even though the router has the ISP's DNSes configured, HOST A cannot resolve domain names if 192.168.1.1 is configured in /etc/resolv.conf. If I put one of the ISP's nameservers in /etc/resolv.conf HOST A can resolve. HOST B cannot resolve even if the ISP's nameserver is in /etc/resolv.conf.
The switch does not have an Ethernet connection to the router (and cannot). Perhaps this is the problem with HOST B. Maybe it needs something using HOST A to route, perhaps an iptables setting for forwarding? I've tried using HOST A's 1.30 IP in HOST B's resolv.conf, but no luck there.
The Windows VM also does not resolve domain names no matter what I use as the nameserver, but first things first! How do I get HOST B to resolve?
Phones and laptops connecting to the router via wireless and DHCP have no problems resolving domain names.
If it was a DNS problem with the router wouldn't phones and laptops have the same problem. The problem I believe is the OP has not configured host A for "internet connection sharing" correctly. How was it initially configured? Have you checked the routes and gateways so they "point" to the new router?
You can use NAT but host A eth0, host B and Windows needs to be on another subnet.
Of course this is not the case but similar. My ISP would block access to their internal DNS servers when I was late in payments. All I had to do was to set Google DNS (Or any other public DNS) and voila!, I could navigate again... So in my local network devices always had a public DNS, just in case.
209.18.47.61 is an IP address that belongs to 'Charter Communications Inc'
Why is this IP address set to use this IP as your DNS resolver? Probably mining dns requests for a multitude of business, marketing, analysis, etc reasons.
The Netgear can be wiped clean and have openwrt installed.
Recommendation is to do that and you will have a solid router/wireless unit for years. https://openwrt.org/toh/netgear/r7800
If it was a DNS problem with the router wouldn't phones and laptops have the same problem. The problem I believe is the OP has not configured host A for "internet connection sharing" correctly. How was it initially configured? Have you checked the routes and gateways so they "point" to the new router?
You can use NAT but host A eth0, host B and Windows needs to be on another subnet.
I suppose I could continue to play with iptables routing and get this working, but I decided to take the easy way out and modified my setup as follows:
Code:
[Internet]
|
+-------------------------------+
| Netgear router |
| LAN IP 192.168.1.1 |
| DNS 209.18.47.61; 209.18.47.62|
+----------+--------------------+
|
[switch]
|
+------------+--------+
| |
+----------------------+ +--------------+ +----------------------+
| HOST A | HOST B | | Windows VM on HOST B |
| 192.168.1.60 eth0 | | 192.168.1.58 |--| 192.168.1.180 |
+----------------------+ +--------------+ +----------------------+
I connect the Linux host's Ethernet ports to the router via a switch (the Windows VM uses HOST B's interface) and discontinued using the wireless mode on HOST A. That was easy enough and saved much experimentation time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.