Powershell Core "Couldn't resolve host name" - linux

I'm using Powershell 6b5 AppImage on Arch Linux (using the official AppIimage). I have no trouble using IPv4 and IPv6 networking outside of powershell, both URL and IP. However, in PS, when I invoke the following command:
iwr 'http://google.com',
I get
iwr : Couldn't resolve host name.
I get the same error when I do the following (the IPv4 address is one of google.com)
iwr 'http://172.217.26.238'
Using the IPv6 address, I get a 404, which means that connection works fine:
iwr 'http://[2404:6800:4009:808::200e]'
Does anybody have any pointers on how to fix this?

Related

Caddy 2 not running in Docker: "cannot assign requested address"

I'm trying to run the official Caddy 2 docker image. According to that page, to do that you should run:
docker run -p 80:80 \
-v $PWD/index.html:/usr/share/caddy/index.html \
-v caddy_data:/data \
caddy
When I run this, I get the following error:
{"level":"info","ts":1590185286.853735,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
run: loading initial config: loading new config: starting caddy administration endpoint: listen tcp 45.90.28.0:2019: bind: cannot assign requested address
I'm not sure why it's trying to bind to that IP address by default? I tried changing it in the Caddyfile but it still doesn't bind correctly, and anyway that doesn't really solve the underlying issue here.
What could be causing this problem? Should I be using Caddy 1 instead?
I experienced this issue recently on Linux and the root cause for me was that my ISP supplied routers DNS server was resolving localhost to an incorrect IP address.
You might want to try changing your DNS servers to Cloudflare's 1.1.1.1 or Google's 8.8.8.8 servers.

iis error: localhost refused to connect, ERR_CONNECTION_REFUSED

I am installing a server using IIS 7, and I succeded to install it, and access it by localhost:80 or [my IP]:80. But when I use my smartphone, when I access to [my IP]:80, I get "localhost refused to connect: ERR_CONNECTION_REFUSED". What should I do to solve this error?
I tried to restart IIS, but it didn't work.
I tried to check the log file, but there was no error.
According to your description, I guess you may not add the ip address binding for your router.
I suggest you could try to add the both public ip and vitual ip into the binding and make sure your domain is right.
More details about how to add the binding, you could refer to below image:

Unknown hostname error - Raspbian

I have a windows server running inside a VM and trying to access it from a raspberry pi 3 which is configured to have access to the VM network.
Problem is when I ping the server with its' IP it responds but when I do it with the name (in my case it's nlux807) it throws Unknown Hostname nlux807
How can I resolve it?
I am quite new to Raspbian. Any handy tip will be appreciated.
If the Windows server has a static IP, you can edit the file /etc/hosts on the Raspberry Pi device and add the following line:
192.168.0.99 nlux807 # Actually the IP address of the Windows server
That will make ping nlux807 work.
This is similar to ssh-could-not-resolve-hostname-name-or-service-not-known.

Unknown host connecting to internet in ubuntu

I tried to connect to my wifi network but i am not able to connect through my laptop .My other device at home are able to connect to internet. I am using ubuntu 16.04 LTS . I set my browser proxy to no proxy . I have no antivirus installed .
I tried to ping -c 5 (google .com and facebook.com) in terminal its showing unknown host google.com and unknown host facebook.com and tried to install eclipse while downloading it shows error java error unknown host .
Please help me to solve this issue.
Sounds like DNS may not have been configured when you connected to the network. This should normally happen automatically, but you can check by looking at the file /etc/resolv.conf. There should be at least one line in the file containing nameserver and an IP address.
If there are no nameserver lines, or if there's only one and it says nameserver 127.0.0.1, then you can try to use Google's public DNS by adding the line nameserver 8.8.8.8 (replacing the 127.0.0.1 if that's present).
Like everyone, I had to face this issue. So what did I do to address this issue?
1) I configured my Ubuntu server to have two network interfaces (NAT and Intnet).
2) In /etc/network/interfaces , I added the following lines:
auto enp0s8
iface enp0s8 inet static
address 192.168.10.23
dns-nameservers 8.8.8.8 8.8.4.4
3) Restarted the network - /etc/init.d/networking restart
Result: ping google.com worked.
I hope this helps you in resolving this issue :)

Change hostname of Linux machine

I have a host "india.niksula.hut.fi". I want to change it to "test.india.niksula.hut.fi". I ran the command:
sudo hostname test.india.niksula.hut.fi
I also modified the /etc/hostname file to have "test.india" instead of "india", which was previously the case. When I ran the command:
hostname --fqdn
I get "test.india.niksula.hut.fi". Now, when I am trying to ping that name from another machine, it gives:
ping: unknown host test.india.niksula.hut.fi
SSH also gives the same result. I need to be able to access the name "test.india.niksula.hut.fi". Can anyone help please?
Thanks in advance!
How should the other machine know about the host name at all? Have you a DNS-service running where you store your host mames with the corresponding IP addresses?
So you either run a DNS service or store the host-names with the proper IP addresses in your /ets/hosts on all your machines.

Resources