Windows 8.1 + DNSCrypt + Unbound for DNS Cache - windows

I'm following this guide (http://yvoinov.blogspot.it/2014/05/windows-7-unbound-dnscrypt.html) and others but nothing:
I have Windows 8.1 x64, DNSCrypt 1.4.3, Unbound last version downloaded from the site.
I started DNSCrypt on 127.0.0.1:53, changed my DNS setup in network card to 127.0.0.1 and I set this in service.conf of Unbound:
# Unbound configuration file on windows.
# See example.conf for more settings and syntax
server:
# verbosity level 0-4 of logging
verbosity: 4
# if you want to log to a file use
logfile: "C:\unbound.log"
prefetch: yes
prefetch-key: yes
minimal-responses: yes
do-ip4: yes
do-ip6: no
do-udp: yes
do-not-query-localhost: no
local-zone: "example.com" redirect
local-data: "example.com A 127.0.0.1"
forward-zone:
name: "."
forward-addr: 127.0.0.1#53
server: auto-trust-anchor-file: "C:\Program Files (x86)\Unbound\root.key"
Where I'm wrong?
If I go to example.com the site shows, also if Unbound have to redirect it to 127.0.0.1 as I set it.
This means that Unbound is not correctly configured and not works. Isn't it?

forward-addr: 127.0.0.1#53 doesn't make sense, since Unbound is probably also listening to port 53.
You need to have dnscrypt-proxy listen to a different port, such as 5353, and forward to that port in Unbound's configuration.

I installed dnscrypt with:
dnscrypt-proxy.exe -R “dnscrypt.eu-nl” -a 127.0.0.2:40 –install
& added at the end of:
C:\Program Files (x86)\Unbound\service :
##### Settings for dnscrypt #####
forward-zone:
name: “.”
forward-addr: 127.0.0.2#40
& in the Windows network interface properties set the dns server to 127.0.0.1 (unbound listens by default on port 53 # 127.0.0.1 && ::1)
Tested in Windows 10.

Related

This address: 127.0.0.1:5000 on Mac Catalina not working (docker) but working on Windows

This address: 127.0.0.1:5000 on Mac Catalina not working (docker) but working on Windows.
Question:
How do I get access to port:5000 working on my MAC?
# 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
# Added by Docker Desktop
# To allow the same kube context to work on the host and the
container: 127.0.0.1 kubernetes.docker.internal
# End of section
Update the line ## 127.0.0.1 localhost to 127.0.0.1 localhost in your /etc/hosts file.
Basically # is used for commenting in bash.
After that, you will be able to access using 127.0.0.1:5000 and http://localhost:5000

MacOS doesn't resolve localhost to 127.0.0.1 (ignores hosts / apache vhosts)

I ran into the problem, that localhost redirects to a specific domain instead of 127.0.0.1.
My configuration is a local apache/mysql/php installation on MacOS Mojave using vhosts for different projects that are configured in hosts to redirect properly.
When I enter 127.0.0.1 in any browser, I get to my overview page lying in the www root. The same should happen, when I enter localhost in the browser, but instead it redirects to a domain of a project I was working on in the past. It happens also without network connection, so the configuration is on this machine.
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 project1.local project2.local
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
The first line seems to be ignored and localhost doesn't resolve to 127.0.0.1.
I only have two vhost configurations plus default configuration with no wrong redirection and also the httpd.conf lookes fine. I searched the whole machine with grep -lr "redirectiondomain.com" * without results. I tried with apache switched off with the same result and looked up the MacOS network settings but I can't find anything related to the wrong redirection neither any other solution on stackoverflow or google that solves my issue. Has anybody a clue how the wrong redirection of localhost could be set somewhere else?
Edit: My hostname in MacOS is set. I tried localhost without port, with :80 and :8080

hostname cannot resolved during installation of IBM private cloud ce

I installed IBM-Cloud-private-ce by following the guide https://www.ibm.com/support/knowledgecenter/SSBS6K_1.2.0/installing/install_containers_CE.html
But after I ran docker run -e LICENSE=accept --net=host -t -v "$(pwd)":/installer/cluster ibmcom/cfc-installer:1.2.0 install, I got the following error messages
task path: /installer/playbook/roles/check/tasks/main.yaml:78
fatal: [a.b.c.d] => Hostname should be resolved to a valid IP address
fatal: [a.b.c.e] => Hostname should be resolved to a valid IP address
I put the ip address as [a.b.c.d] just for confidential. Actually they are numbers here. These IP address are reachable.
By checking the ansible file, I noticed the following code
- name: Checking Hostname is resolvable
shell: ping -c 1 $(hostname) | awk -F'[()]' '{print $2;exit}'
args:
executable: /bin/bash
register: ip_out
- name: Validating Hostname is resolvable
fail: msg="Hostname should be resolved to a valid IP address"
when: ip_out.stdout in ['', '127.0.0.1', '127.0.1.1']
I found I cannot ping in the container as the image hasn't ping in it.
Is this the reason why I got the message? I appreciate if anyone could help on it.
Updated the question. Thanks #SBERENS
I tried on the 2.1.0 version and met the same issue: (for confidential reason, I used a.b.c.d as the IP address, actually the IP address are reachable)
My /etc/hosts is like the following:
127.0.0.1 localhost
127.0.1.1 e1.xx.yy.com e1
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#puppet:
a.b.c.a puppet.xx.yy.com puppet
a.b.c.d e1.xx.yy.com e1
a.b.c.e e2.xx.yy.com e2
The cluster/hosts is like:
[master]
a.b.c.d
[worker]
a.b.c.e
[proxy]
a.b.c.e
#[management]
#4.4.4.4
The link you posted seems to be for older 1.2 level.
Please check that you are following the correct most updated installation instructions.
Latest version ICP 2.1 - CE are here:
https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0/installing/install_ce.html
Can you please post your /etc/hosts file and the cluster/hosts file contents?
Your issue will occur in either 1.2 or 2.1.
The error is that the hostname e1.xx.yy.com resolves to a.b.c.d and 127.0.1.1. When this happens, the installer is enforcing the resolved IP to be something which is externally routable.
Is there a reason why you have the machine hostname defined on the local address in addition to a separate network IP?
Suggest removal of the line:
127.0.1.1 e1.xx.yy.com e1
from /etc/hosts. This can cause DNS confusion esp on Ubuntu.

gethostbyname fail after switching internet connections

I often (but not always) get the following error when running MPI jobs after switching wifi hosts.
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(498)..............:
MPID_Init(187).....................: channel initialization failed
MPIDI_CH3_Init(89).................:
MPID_nem_init(320).................:
MPID_nem_tcp_init(171).............:
MPID_nem_tcp_get_business_card(418):
MPID_nem_tcp_init(377).............: gethostbyname failed, MacBook-Pro.local (errno 1)
Everything works fine in the coffee shop, and then when I come home, I get the above error. Nothing else has changed.
I've checked the /etc/hosts and /private/etc/hosts files, and they look okay -
##
# 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
I can ping localhost, so the problem isn't exactly that localhost isn't resolved.
Rebooting always fixes the problem, but is there something simple I can do to "reset" my system so that it recognizes local host?
I don't have access to the details of the MPI initialization routines in the code I am running and am not making any explicit calls to gethostname.
I am using MPICH 3.1.4 (built Feb, 2015) and am running OSX 10.10.3
The answer is very simple - here is what seems to work.
I edited the file /etc/hosts (or /private/etc/hosts, in OSX) and added the line
127.0.0.1 macbook-pro.local
so now my hosts files looks like :
##
# 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
127.0.0.1 macbook-pro.local
We were facing this issue intermittently on our CI server. It seems that setting the environment variable MPICH_INTERFACE_HOSTNAME to localhost helped.

Installing Glassfish 3 on Mac OS X 10.8.2 fails in Domain Info setup

I am a Glassfish newbie, though a Java and Unix veteran. I am running the shell script to install Java EE 6 SDK, including Glassfish 3 on my Mac.
bash-3.2# sh java_ee_sdk-6u4-unix.sh
Everything goes along fine until I get to the Domain Info screen. I am sticking with the default info (except for passwords):
Domain Name: domain1
Admin Port: 4848 <- I have verified with netstat that both ports are free
Http Port: 8080 <-
Username: admin
Password: xxxxxxxxxxxx
Service Name: domain1Service
+ Start domain after creation
When I click Next, I get 2 error dialogs that tell me the following:
Admin Port: Host name not found
Http Port: Host name not found
Does anyone know how to get past this?
I confirm, I correct the same problem by changing my hostname to localhost using the command line hostname localhost in linux.
Looks like something is wrong with your network config. Maybe your hosts file is missing the entry for localhost.
Check the file /private/etc/hosts for
127.0.0.1 localhost
You can also try to set your hostname with
sudo hostname localhost
The answer was relatively simple. I had to add the hostname configured with MacOS Settings as an alias for localhost into my /etc/hosts file. I'm not sure where MacOS keeps the host name. But the hostname command (i.e. gethostname) was returning 'airguitar', which is what Glassfish was trying to connect to. Since it wasn't in /etc/hosts, the hostname couldn't be found.
This is a problem that happens on many systems, It's happening on my linux as well. The solution is quite simple, as chuck almost got it.
Check your hosts file, on linux is under /etc/hosts. You'll probably have a file like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Check your hostname with the command hostname
[root#glassfish1 opt]# hostname
glassfish1
And add this host name to your hosts file like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 glassfish1
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
this did the trick for me.

Resources