Internet over Wi-Fi working but not over Ethernet (LAN)


I have run into a curious problem. When I connect my MacBook via LAN cable, the Internet doesn't work, but I can still ping other devices in my network (including the router) and also can access my network hard disk.

When I connect via Wi-Fi to the same router, the Internet works, so does anything else as it's supposed to.

I prefer using the LAN cable as it's faster and more reliable, so I really would like to solve this issue.

Please, note that I cannot restart my computer, because I'm running a very important operation, which cannot be interrupted and will take several weeks.

I hope someone will point me to the right direction as to investigating this issue.


  • macOS Catalina Version 10.15.7
  • MacBook Pro (15-inch, 2018)
  • Processor 2,6 GHz 6-Core Intel Core i7
  • Memory 32 GB 2400 MHz DDR4
  • Startup Disk Macintosh HD
  • Graphics Radeon Pro 560X 4 GB
                   Intel UHD Graphics 630 1536 MB

Router: AirPort Time Capsule 802.11ac

UPDATE # 2 as per Allan's question:
Yes, I turn off Wi-Fi when I try to connect via Ethernet and yes, I can ping and I also can ping other websites if I use their IP address but I cannot connect to a university VPN.

UPDATE # 2 as per Allan's question:
output of ipconfig getpacket en0 | grep "domain_name_server" with Wi-Fi turned off => nothing. en0 is my Wi-Fi interface by the way and en8 is my Ethernet, so just in case I issued the command also with en8 instead of en0:
output of ipconfig getpacket en8 | grep "domain_name_server" with Wi-Fi turned off => domain_name_server (ip_mult): {}

Output of both commands with Wi-Fi on is the same => domain_name_server (ip_mult): {}

UPDATE # 3 as per Allan's suggestion:
output of nslookup

;; connection timed out; no servers could be reached

UPDATE # 4 as per Allan's comments:
I am able to successfully ping my router with ping

I am still unable to ping or nor am I able to access the Internet after setting the DNS manually with networksetup -setdnsservers Ethernet, wherein I replaced Ethernet with my the name of my LAN netowork service (found out using networksetup -listallnetworkservices).

With networksetup -getdnsservers Ethernet I get

UPDATE # 5 as per jksoegaard's suggestion:
I tried manually configuring my IPv4 settings under my Ethernet connection in Network preferences, without success:

enter image description here

I also tried changing the default gateway through Terminal:

% sudo route add default
route: writing to routing socket: File exists
add net default: gateway File exists

The internet is still not working properly (cannot browse), though.

Just for note, I am able to successfully ping Google, but not by its web address, but rather using its IP address:
I had to use nslookup with my Wi-Fi on because otherwise (with only my Ethernet on) it wouldn't work. en0 is my Wi-Fi interface.

% nslookup
Non-authoritative answer:

% sudo ifconfig en0 down % 
PING ( 56 data bytes 
64 bytes from icmp_seq=0 ttl=113 time=127.881 ms
64 bytes from icmp_seq=l ttl=113 time=129.241 ms
64 bytes from icmp_seq=2 ttl=113 time=128.347 ms
64 bytes from icmp_seq=3 ttl=113 time=128.451 ms
— ping statistics —
4 packets transmitted, 4 packets received, 0.0% packet loss 
round-trip min/avg/max/stddev = 127.881/128.480/129.241/0.489 ms

UPDATE # 6 as per jksoegaard's update:

networksetup -setdnsservers Ethernet

didn't help.
Here's the output of the other 2 commands:

% dig @

; <<>> DiG 9.10.6 <<>> @
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
% nslookup

;; connection timed out; no servers could be reached


Eventually, I was forced to restart the computer, which solved the problem. I have no idea what it might have been nor how to replicate the issue. I really would like to know what it caused.

Best Answer

According to your question you can access local network devices when on cabled LAN. You have set your DNS server to, but still cannot lookup names.

You're able to ping your router at and other local devices, but not internet servers such as or

This suggests to me that your problem is that the default gateway is set incorrectly. Fix it this way:

  1. Open System Preferences > Network

  2. Choose the Ethernet port in the list on the left

  3. Ensure the Router field is set to:

If it is setup to use DHCP, take a note of your IP address, subnet mask and router addresses, and then change the setting "Configure IPv4" to "Manually" and enter the same values - however note that router should be set to

After applying, you should be able to access web sites and ping servers on the Internet.

You can also try changing this from the Terminal by running:

route add default


Your new update indicates now that you can ping outside IPs successfully, but not when using domain names. This means this is a DNS issue, and not a routing issue.

Change the DNS server IP like this in the Terminal:

networksetup -setdnsservers Ethernet

Then check if web sites start working. If not, run these two commands in the Terminal:

dig @

The output should tell if it is at all possible to lookup DNS via (if not, you probably have some sort of firewall or filtering issue) - or it is due to the specified DNS server not actually being used at all.