Curl, wget etc not working

tjd832

New Member
Joined
Aug 11, 2021
Messages
2
Reaction score
0
Credits
16
It seems that all outbound HTTP/s requests are not working on my system and I'm not sure why.

Code:
user@user-server:~$ curl http://google.com
curl: (56) Recv failure: Connection reset by peer

Ubuntu 20.04.2 LTS
 


Can you even reach your default gateway?
Code:
ip route
Then try to ping your default gateway, for example this.
Code:
ping -c3 192.168.122.1
Replace 192.168.122.1 with the output of your default gateway of the first command.
 
Or merge both commands into one!
Code:
ping -c3 `ip route | awk '/default/ {print $3}'`

What I find interesting is the fact that it says connection reset by peer. This possibly suggest an external culprit since it says the connection was physically reset by a "peer", but we won't know without more data.

I would also run curl again but add the parameters "--trace-ascii trace.txt" in the parameter list of curl.

Example:
Code:
 curl --trace-ascii trace.txt https://google.com
Then paste the output of trace.txt to your next response post.
 
Or merge both commands into one!
Yes that is possible too, there are more ways so you get to choose what you find easiest.
Code:
ip route | awk '{ print $3 }' | head -n1 | xargs ping -c3
I do it in two steps when posting here on the forum because I try to avoid confusing new users and that way they will start to see the basics instead of being scared off my the awk command.
 
Yes that is possible too, there are more ways so you get to choose what you find easiest.
Code:
ip route | awk '{ print $3 }' | head -n1 | xargs ping -c3
I do it in two steps when posting here on the forum because I try to avoid confusing new users and that way they will start to see the basics instead of being scared off my the awk command.

Oh yeah, I get it. I was just having some fun. Actually, I like your new version better. Adds some of that cryptic magic I love so much! :)

EDIT:
Lets add some useless encoding / decoding to your fine work of art. lol
Code:
 ip route | awk '{ print $3 }' | head -n1 | base64 | base64 -d | xargs ping -c3

Okay, I'm going off topic.
 
Can you even reach your default gateway?
Code:
ip route
Then try to ping your default gateway, for example this.
Code:
ping -c3 192.168.122.1
Replace 192.168.122.1 with the output of your default gateway of the first command.
No, I cannot.
Code:
3 packets transmitted, 0 received, 100% packet loss, time 2037ms
 
Can you share the output of the following?
Code:
ip a
 
  • Like
Reactions: Rob
Okay.
Code:
[user@prodnfs1 data]# ip a
HAL: I'm sorry Dave, we do not have Indian Pale Ale on tap.
Hmm. Not helpful.
 
Okay.
Code:
[user@prodnfs1 data]# ip a
HAL: I'm sorry Dave, we do not have Indian Pale Ale on tap.
Hmm. Not helpful.
lol what are you using to generate a random line about ale/beer?
 

Members online


Top