LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-23-2019, 04:43 AM   #1
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Rep: Reputation: Disabled
Curl:(6) could not resolve host


Hi everyone!

I recently installed Tails 3.14.1 on a USB stick and was then trying to download the nginx webserver. I've followed their instructions for Debian distributions so far (http://nginx.org/en/linux_packages.html#Debian).

When I used the following command in the root terminal I ran into the error below:

root@amnesia:/# curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

curl: (6) Could not resolve host: nginx.org
gpg: no valid OpenPGP data found.


I then tried wget as an alternative:

root@amnesia:/# wget https://nginx.org/keys/nginx_signing.key

this gave me:

--2019-06-22 19:50:13-- https://nginx.org/keys/nginx_signing.key
Resolving nginx.org (nginx.org)... 1561233014 PERROR torsocks[12111]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)
failed: Non-recoverable failure in name resolution
wget: unable to resolve host address 'nginx.org'



I also noticed problems when pinging any website:

root@amnesia:/# ping https:/nginx.org
ping: https://nginx.org: Temporary failure in name resolution


Did anyone experience similar issues and managed to fix that?
Would be greatful for an easy fix

Thanks & Best Regards,

Daniel
 
Old 06-23-2019, 07:50 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
These are domain name resolution issues, which may be only because the installation doesn't know of any name servers.

Are you sure you have an internet connection?
What's in /etc/resolv.conf?
 
Old 06-23-2019, 11:55 AM   #3
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
These are domain name resolution issues, which may be only because the installation doesn't know of any name servers.

Are you sure you have an internet connection?
What's in /etc/resolv.conf?
hi scasey,

thanks for the quick response.
internet connection via Tor browser works fine, even though a bit slow.
/etc/resolv.conf has only 1 entry:
nameserver 127.0.0.1

cheers
 
Old 06-23-2019, 02:09 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
If you don't have a name server running on your localhost, that's probably not enough.

What computer are you booting to the USB stick from? What's its OS?
Do you have a router?

Basically, the stick doesn't know how to resolve domain names. That's what you need to fix.
 
Old 06-24-2019, 12:16 AM   #5
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
If you don't have a name server running on your localhost, that's probably not enough.

What computer are you booting to the USB stick from? What's its OS?
Do you have a router?

Basically, the stick doesn't know how to resolve domain names. That's what you need to fix.
computer is a Lenova L460, running on Windows 10 Pro.
If I get that right, I have to tell the system which name server to use, correct?
Where would I start with this?

thx
 
Old 06-24-2019, 12:37 AM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by new_penguin View Post
computer is a Lenova L460, running on Windows 10 Pro.
If I get that right, I have to tell the system which name server to use, correct?
Where would I start with this?

thx
What name servers is Windows using?

Add those to /etc/resolv.conf See man resolv.conf
 
Old 06-24-2019, 06:45 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Thwe messages in post #1 are obvious: no (direct) internet connection.

Windows 10?
Tails? Web server? nginx?

What are you really trying to achieve here?
 
Old 06-24-2019, 09:00 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
I have not played with tails in a long time and no expert to how it all works.
Tails uses the tor network which the browser is already configured and working. Any command line tool needs to use the tor proxy but the torsocks error probably means something isn't configured correctly.

Tails is a live system and you need to configure persistence before you can save files to the USB drive.
 
Old 06-24-2019, 09:08 AM   #9
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Talking

Quote:
Originally Posted by scasey View Post
What name servers is Windows using?

Add those to /etc/resolv.conf See man resolv.conf
I added the nameservers of google and Open DNS to resolv.conf, but no success.
In the meantime I found info on how DNS in Tails is configured so that no application is able to connect to the internet without using the Tor network. That would explain the symptoms... if anyone knows how to work around this, that would be awesome
 
Old 06-24-2019, 09:10 AM   #10
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
I have not played with tails in a long time and no expert to how it all works.
Tails uses the tor network which the browser is already configured and working. Any command line tool needs to use the tor proxy but the torsocks error probably means something isn't configured correctly.

Tails is a live system and you need to configure persistence before you can save files to the USB drive.
hi michalek
sounds reasonable...thats basically what I just found out. any experience with proxy and torsocks config?
ps: persistent storage is configured
 
Old 06-24-2019, 09:13 AM   #11
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Wink

Quote:
Originally Posted by ondoho View Post
Thwe messages in post #1 are obvious: no (direct) internet connection.

Windows 10?
Tails? Web server? nginx?

What are you really trying to achieve here?
mid term goal is to download and install the nginx webserver in tails (recommended app)
in the end I’d like to get an onion service up and runnig...just out of curiosity and interest in recent online developments...
my last touchpoint with webdesign and stuff was about 15 years ago
 
Old 06-24-2019, 01:26 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Check your /etc/tor/torsocks.conf file and see if it is configured for port 9150.
 
Old 06-24-2019, 01:40 PM   #13
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,295
Blog Entries: 3

Rep: Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719
Quote:
Originally Posted by new_penguin View Post
In the meantime I found info on how DNS in Tails is configured so that no application is able to connect to the internet without using the Tor network. That would explain the symptoms... if anyone knows how to work around this, that would be awesome
Not around it but through it. If it's not there already, you might be able to install torsocks and then use that to launch curl or wget.
 
Old 06-24-2019, 01:43 PM   #14
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,295
Blog Entries: 3

Rep: Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719
Quote:
Originally Posted by new_penguin View Post
in the end I’d like to get an onion service up and runnig...just out of curiosity and interest in recent online developments...
You don't need Tails for that. You can use Devuan, Debin, Mint, or anything that has both Tor and Nginx. See: https://www.torproject.org/docs/tor-...ervice.html.en

You can even go full out hipster and run gopher instead of http / https.
 
Old 06-24-2019, 02:23 PM   #15
new_penguin
LQ Newbie
 
Registered: Jun 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Check your /etc/tor/torsocks.conf file and see if it is configured for port 9150.
torsocks.conf says TorPort 9050...per default
can and should that be changed?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help to resolve "error when calling class $cls: $args" when i try to run my .tcl file. could you please help me to resolve. bharaths248 Linux - Newbie 3 03-16-2019 07:38 AM
[SOLVED] Could not resolve host: deb.i2p2.de bk328115 Linux - Newbie 3 07-06-2018 02:24 AM
[SOLVED] could not resolve host: mirrors.kernel.org nuclearcoconut Linux - Newbie 2 02-24-2016 01:54 PM
Php curl can't resolve host. Maris-S Slackware 1 01-26-2011 11:49 PM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-11-2009 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration