Where can be defined a custom IP for a host on Win10 (not in etc\hosts) - windows

I can not figure out why host name davno.pw is on 127.0.0.1 for my local workstation.
The site is up and running on 5.45.126.52 and its okay
But locally I only see that the name points to 127.0.0.1
And nothing about it in the hosts file:
c:\Windows\System32\drivers\etc\hosts
(the only uncommented line is 127.0.0.1 localhost)
and at the same time
> ping davno.pw
--- PING davno.pw [127.0.0.1] 32 bytes of data. ---
Reply from 127.0.0.1: 32 bytes time<1ms TTL=128
It might be some heritage of Open server but I have no idea where the configuration is.

Related

clickhouse-client cannot login after enable listen host 0.0.0.0

After installed the ClickHouse on Ubuntu 18.04.2 in Hyper-V VM, I use clickhouse-client inside the VM to connect, it works fine.
I used the browser in Host PC to open http://127.27.16.11:8123, it shows ERR_CONNECTION_REFUSED error. Then I edit the /etc/clickhouse-server/config.xml and uncomment the 0.0.0.0 and restart the clickhouse-server. I refresh the browser and it shows OK status.
However, when I use clickhouse-client inside the VM to connect server again, it prompts Connection refused. Is there any way to enable both local and remote connection?
Also tried to enable both IPv4 and IPv6
::
0.0.0.0
ubuntu02:/$ clickhouse-client
ClickHouse client version 19.11.3.11 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 19.11.3 revision 54423.
ubuntu02 :) quit
Bye.
ubuntu02:/$ sudo vi /etc/clickhouse-server/config.xml
[sudo] password for panco:
##uncomment
<listen_host>0.0.0.0</listen_host>
ubuntu02:/$ ping ubuntu02
PING ubuntu02 (172.27.16.11) 56(84) bytes of data.
64 bytes from ubuntu02 (172.27.16.11): icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from ubuntu02 (172.27.16.11): icmp_seq=2 ttl=64 time=0.040 ms
^C
--- ubuntu02 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3039ms
rtt min/avg/max/mdev = 0.015/0.033/0.040/0.012 ms
ubuntu02:/$ sudo service clickhouse-server restart
ubuntu02:/$ clickhouse-client
ClickHouse client version 19.11.3.11 (official build).
Connecting to localhost:9000 as user default.
Code: 210. DB::NetException: Connection refused (localhost:9000)
Code: 210. DB::NetException: Connection refused (localhost:9000)
found the answer, I was too focus on those IP that I used is IPv4, indeed, Ubuntu enable IPv6 by default installation. It just simple uncomment this line
<listen_host>::</listen_host>
The problem is solved. Thanks Slesh for your kindly respond anyway.
Try This :
clickhouse-client -h 127.0.0.1
You can to specify few host to listen. Try this configuration:
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<listen_host>::</listen_host>
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
<listen_host>::1</listen_host>
<listen_host>127.0.0.1</listen_host>
Need to know the port of clickhouse
netstat -tulpn | grep LISTEN
And connect externally IP.
ex.
clickhouse-client -h 1.12.123.45 --port 9020 -u default --password my_strong_pass

How on Mac OS use .localhost instead on .dev in Chrome by dnsmasq

I installed by this instruction https://passingcuriosity.com/2013/dnsmasq-dev-osx/ .dev support local domain.
When I replaced all configs to localhost instead of dev I can't open my some.localhost domain.
In console I successfully checked some.localhost domain for working:
bash-3.2$ ping -c 1 some.localhost
PING some.localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.036 ms
But in chrome I have a CONNECTION_REFUSED error yet.
Help me please.

Can not connect vsftpd remotely?

I have a home network with a raspberryPi and a Windows computer. I want to share files between these two via FTP. So I have downloaded, installed and configured VSFTPD on my raspberryPi. Now I can connect this server locally from rasPi but not from my Windows PC.
Below you can find some more information, command outputs, conf file etc.
****Raspberry Pi****
vsftd.conf
listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
user_sub_token=$USER
local_root=/home/$USER/ftp
sudo service --status-all
> sudo service --status-all
[ + ] vsftpd
nmap localhost
> nmap localhost
Starting Nmap 6.00 ( http://nmap.org ) at 2015-12-16 22:55 EET
Nmap scan report for localhost (127.0.0.1)
Host is up (0.029s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 996 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
5002/tcp open rfe
Nmap done: 1 IP address (1 host up) scanned in 4.80 seconds
ftp localhost
> ftp localhost
Connected to localhost.
220 (vsFTPd 2.3.5)
Name (localhost:pi): pi
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
****Windows****
ping 192.168.2.140
> ping 192.168.2.140
Pinging 192.168.2.140 with 32 bytes of data:
Reply from 192.168.2.140: bytes=32 time=1ms TTL=64
Reply from 192.168.2.140: bytes=32 time<1ms TTL=64
Reply from 192.168.2.140: bytes=32 time<1ms TTL=64
Reply from 192.168.2.140: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.2.140:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
ftp 192.168.2.140
> ftp 192.168.2.140
ftp: connect :Connection timed out
Thanks for help.
One possible reason why you can connect locally, but not remotely, is due to which user VSFTPD is accessing the local user account under. Is it ROOT or is it the USER ID you've logged into.
In reviewing your settings, I noted you have:
chroot_local_user=YES
write_enable=YES
local_root=/home/$USER/ftp
I would also add:
allow_writeable_chroot=YES
seccomp_sandbox=NO
And I would execute:
setsebool -P ftp_home_dir on
Should this suggestion fail, I also asked a similar question in Ask Fedora Forums. Link to Question. In this question, I posted several links to articles that discussed setting up VSFTPD. Maybe one of these will give you a hint towards what to look for.
Some of their suggestions are:
allow a global user for VSFTPD full file system access
This is a very dangerous option and breaks many security protocols VSFTPd is trying to help protect you from.
change the read write privileges on /home/$users to a-w
This change is not needed if you add "allow_writeable_chroot=YES", and set the SELinux ftp_home_dir ON.
Hope that this helps.

Hosts file not honoring the dev sites mapping in OSX Yosemite

This issue has been affecting my multi-site development since months and on. My Yosemite OSX hosts file (located at /etc/hosts never honors these sites I put in at the top:
192.168.10.10 blackbird.dev
192.168.10.10 saveeo.dev
What might be wrong? To help the answerers understand the situation, I've done the following:
Flushed the DNS cache
My Homestead.yaml file looks like this below [see A]
Homestead destroyed and ran again (nope, no difference)
Computer restarted and ran again (nope, no difference)
If I go 192.168.10.10, one site opens up, the first one listed in .yaml
If I do saveeo.dev or blackbird.dev, this shows up [see B]
If I ping from my local machine, I get this [see C]
If I ping from within the box (doing homestead ssh) and then I see this. [ see D]
What is happening, help me out. I've used all my knowledge to make this work, but I just don't know what is causing this. I am not able to access my dev sites through the browser like app.dev and app2.dev. Quite frustrating.
Appendix A
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/aligajani/Dropbox/Vinkk_Software
to: /home/vagrant/Vinkk_Software
- map: /Users/aligajani/Dropbox/hackathon
to: /home/vagrant/hackathon
sites:
- map: blackbird.dev
to: /home/vagrant/Vinkk_Software/blackbird/public
- map: saveeo.dev
to: /home/vagrant/hackathon/saveeo/public
databases:
- homestead
- saveeo
variables:
- key: APP_ENV
value: local
Appendix B
This webpage is not available
ERR_CONNECTION_TIMED_OUT
Appendix C
PING saveeo.dev (127.0.53.53): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
PING blackbird.dev (127.0.53.53): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Appendix D
ping saveeo.dev
PING saveeo.dev (127.0.53.53) 56(84) bytes of data.
64 bytes from 127.0.53.53: icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from 127.0.53.53: icmp_seq=2 ttl=64 time=0.055 ms
ping blackbird.dev
PING blackbird.dev (127.0.53.53) 56(84) bytes of data.
64 bytes from 127.0.53.53: icmp_seq=1 ttl=64 time=0.019 ms
64 bytes from 127.0.53.53: icmp_seq=2 ttl=64 time=0.040 ms
My hosts file kept on being ignored after I edited in text edit. I tried several ways to fix the line endings, added IPv6 entries to the existing IPv4 entries with no success. The only solution that worked is using this free GUI plugin to edit hosts file.
https://github.com/specialunderwear/Hosts.prefpane/blob/master/README.mdown
It sounds like an issue with your mac dns resolution and nothing to do with vagrant.
Check out https://apple.stackexchange.com/questions/158117/os-x-10-10-1-etc-hosts-private-etc-hosts-file-is-being-ignored-and-not-resol

Add route from single ip to localhost. OSX Mavericks

on my MacbookPro 15'' Retina, with OSX 10.9.4, I want to be able to:
route all single ip traffic to localhost.
My Goal is this:
I type http://192.168.1.54/test.html in the browser and I get what I normally get from
http://localhost/test.html
This is what I tried (en4 is the one I get internet connection from):
______$ sudo route add 192.168.1.54 localhost -ifp en4
checking the list
______$ sudo route add 192.168.1.54 localhost -ifp en4
add host 192.168.1.54: gateway localhost
______$ netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGSc 42 4 en4
127 127.0.0.1 UCS 0 3 lo0
127.0.0.1 127.0.0.1 UH 50 15380 lo0
...
192.168.1.54 127.0.0.1 UGHS 0 0 en4
...
But the ping of 192.168.1.54 isn't working
I tried also the loopback interface with
______$ sudo route add 192.168.1.54 localhost -ifp lo0
getting the same result: nothing.
I'm kind of a newbie in this stuff, so any help will be great
Fire up your Terminal and type the following:
sudo ifconfig lo0 alias 192.168.66.66
After entering your password, that will redirect requests for 192.168.66.66 to the localhost/loopback adapter.
And if you need to remove this redirect, try
sudo ifconfig lo0 -alias 192.168.66.66
Source: http://www.vincecutting.co.uk/web-development/redirect-ip-address-back-to-localhost-on-mac-osx/
You'll need to create a mac virtual interface pointing to 192.168.1.54. Otherwise there is no one to reach at 192.168.1.54 and hence why your ping is failing.
In linux it's pretty straight forward to create additional virtual interfaces.
On my mac osx machine I was able to go into Systems Preferences --> Network
then hit the + sign to add an additional interfaces.
I picked Ethernet as my interface type and assigned the address of 192.168.1.54, 255.255.255.0 subnet mask and 192.168.1.1 as the default router.
Now both my primary 192.168.1.10 and my virtual 192.168.1.54 interfaces are up and pingable.
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
ether 0c:4d:e9:9a:1c:a3
inet6 fe80::e4d:e9ff:e936:1ca3%en0 prefixlen 64 scopeid 0x4
inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.54 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=1<PERFORMNUD>
media: autoselect (100baseTX <full-duplex>)
status: active
My-Book-Pro:~ root# ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10): 56 data bytes
64 bytes from 192.168.1.10: icmp_seq=0 ttl=64 time=0.095 ms
64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.101 ms
My-MacBook-Pro:~ root# ping 192.168.1.54
PING 192.168.1.54 (192.168.1.54): 56 data bytes
64 bytes from 192.168.1.54: icmp_seq=0 ttl=64 time=0.085 ms
64 bytes from 192.168.1.54: icmp_seq=1 ttl=64 time=0.091 ms

Resources