1

I am using an iMac (27-inch, Late 2013) running Yosemite 10.10.2 (14C109). Recently I ran a curl command and it appears as though there is a local proxy or server running on my computer. Here is the command I ran:

curl -v -L google.com > /dev/null 2> log.txt

...and here is the output:

* Rebuilt URL to: google.com/
* Hostname was NOT found in DNS cache
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 173.194.123.98...
* Connected to google.com (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1^M
> User-Agent: curl/7.37.1^M
> Host: google.com^M
> Accept: */*^M
> ^M
< HTTP/1.1 301 Moved Permanently^M
< Location: http://www.google.com/^M

The specific part that puzzles me is:

Connected to google.com (127.0.0.1) port 80 (#0)

Can anyone tell me how to tell what is going on here? Could this be the local firewall or something, I worry that something malicious could be happening.

Here is my /etc/hosts file:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost
3
  • Can you add the output of 'scutil --dns' please?
    – Martin
    Mar 5, 2015 at 19:38
  • scutil --dns DNS configuration resolver #1 search domain[0] : [my provider's domain] nameserver[0] : 10.0.1.1 if_index : 4 (en1) flags : Request A records reach : Reachable,Directly Reachable Address DNS configuration (for scoped queries) resolver #1 search domain[0] : [my provider's domain] nameserver[0] : 10.0.1.1 if_index : 4 (en1) flags : Scoped, Request A records reach : Reachable,Directly Reachable Address Mar 5, 2015 at 20:57
  • It's not any help, but I'm seeing the same thing, too. That's how I found this topic. Jul 29, 2015 at 3:31

2 Answers 2

1

curl might redirect to localhost if you're using ScreenTime restrictions on macOS—even if the website is accessible via a browser.

0

At least in my case it was Sophos Web Protection that was causing it. You can turn it off in the Sophos Preferences to check.

See: http://openforum.sophos.com/t5/Sophos-Anti-Virus-for-Mac-Home/Web-Intelligence-and-cURL/m-p/21403

You must log in to answer this question.

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