LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Curl:(6) could not resolve host (https://www.linuxquestions.org/questions/linux-newbie-8/curl-6-could-not-resolve-host-4175656223/)

new_penguin 06-23-2019 04:43 AM

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

scasey 06-23-2019 07:50 AM

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?

new_penguin 06-23-2019 11:55 AM

Quote:

Originally Posted by scasey (Post 6008194)
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

scasey 06-23-2019 02:09 PM

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.

new_penguin 06-24-2019 12:16 AM

Quote:

Originally Posted by scasey (Post 6008276)
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

scasey 06-24-2019 12:37 AM

Quote:

Originally Posted by new_penguin (Post 6008385)
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

ondoho 06-24-2019 06:45 AM

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

Windows 10? :confused:
Tails? Web server? nginx?

What are you really trying to achieve here?

michaelk 06-24-2019 09:00 AM

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.

new_penguin 06-24-2019 09:08 AM

Quote:

Originally Posted by scasey (Post 6008390)
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

new_penguin 06-24-2019 09:10 AM

Quote:

Originally Posted by michaelk (Post 6008490)
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? :D
ps: persistent storage is configured

new_penguin 06-24-2019 09:13 AM

Quote:

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

Windows 10? :confused:
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 ;)

michaelk 06-24-2019 01:26 PM

Check your /etc/tor/torsocks.conf file and see if it is configured for port 9150.

Turbocapitalist 06-24-2019 01:40 PM

Quote:

Originally Posted by new_penguin (Post 6008494)
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.

Turbocapitalist 06-24-2019 01:43 PM

Quote:

Originally Posted by new_penguin (Post 6008498)
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.

new_penguin 06-24-2019 02:23 PM

Quote:

Originally Posted by michaelk (Post 6008600)
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? :)


All times are GMT -5. The time now is 05:51 AM.