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 apple.com

;; 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 www.apple.com or www.google.com 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 www.google.com
Non-authoritative answer:
Name:   www.google.com

% 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 @ www.google.com

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

;; connection timed out; no servers could be reached


UPDATE # 7: 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.

  • Do you turn off wifi when connected via Ethernet? Can you ping
    – Allan
    Oct 16, 2020 at 22:12
  • @Allan yes and yes, please see my update
    – yssup
    Oct 17, 2020 at 8:47
  • if you can ping that IP then Internet is working. Can you ping www.apple.com?
    – Allan
    Oct 17, 2020 at 13:28
  • @Allan Well, I can't browse any website nor connect to the VPN. I'm unable to ping www.apple.com, but I'm able to ping their IP address (found using nslookup www.apple.com)
    – yssup
    Oct 17, 2020 at 13:51
  • That's a DNS issue. Start by flushing your DNS cache. Type the following command: sudo killall -HUP mDNSResponder then try pining apple.com again
    – Allan
    Oct 17, 2020 at 14:10

1 Answer 1


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 apple.com or google.com.

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 @ www.google.com
nslookup www.google.com

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.

  • Did not help, please see my update.
    – yssup
    Oct 18, 2020 at 11:50
  • @yssup Your update indicates now that you can ping outside IPs successfully... then this is only a DNS issue, and not a routing issue. I have updated the answer accordingly.
    – jksoegaard
    Oct 18, 2020 at 12:36
  • Please see update.
    – yssup
    Oct 18, 2020 at 13:46
  • @yssup This indicates that there's something filtering your DNS requests. Try connecting to WiFi and check in System Preferences => Network which IP-address the DNS server has when connected via WiFi. Then use the same DNS IP address when you're cabled network. Did that work? ... I assume you have some kind of "safe dns" filter enforced by an ISP, or an employer, or similar.
    – jksoegaard
    Oct 18, 2020 at 15:17
  • My DNS server address is under the DNS tab in the Advanced window of my Wi-Fi network settings.
    – yssup
    Oct 18, 2020 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .