Can't ping device through hostname (and avahi installed) from pc - embedded-linux

I need to ping and establish communication with an embedded device through its hostname. I'm using the latest buildroot and I enabled avahi and mDNS.
The first problem is that my hostname at startup is always buildroot and the problem is how change my hostname through avahi library and apply immediately on the network.
Can someone help me to configure my device?

Related

No access to web or mysql on vagrant after upgrading to macos monterey

Last week I decided to upgrade the mac to the latest version Monterey. Well. Most things works, except for Vagrant. Well.. it works, except there is almost no connection to the server.
vagrant ssh works.
I have been able to launch virtualbox, but access to http or mysql is not happening.
I know the mysql-server is running. The same goes with the apache server.
Logs have been checked and I cannot see that any traffic going to the server.
Ping is not working.
I have updated virtualbox. I have destroyed the box and upgraded vagrant / homestead. still no luck.
MORE INFO:
When I run traceroute I see that the first hit is the correct IP I have set in hosts file. Then it goes to 192.168.0.1 which isn't going anywhere.
I guess the 192.168.0.1 comes from the mac virtualbox / vagrant is running on.
Any pointers on what to do next are welcome.
Probably the same problem as mine (I couldn't use any longer IP 192.168.10.10). VirtualBox did some changes lately (from VirtualBox 6.1.28 I think) and a new configuration is needed to use your preferred (192.168.0.1) IP address:
On Linux, macOS and Solaris Oracle VM VirtualBox will only allow IP
addresses in 192.168.56.0/21 range to be assigned to host-only
adapters. For IPv6 only link-local addresses are allowed. If other
ranges are desired, they can be enabled by creating
/etc/vbox/networks.conf and specifying allowed ranges there. For
example, to allow 10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as
2001::/64 range put the following lines into /etc/vbox/networks.conf:
* 10.0.0.0/8 192.168.0.0/16
* 2001::/64
You can check the whole information here.
Alternatively (skipping the networks.conf configuration) you can use any IP from the initially supported range like for instance: 192.168.56.10

Why can't I connect to 127.0.0.1 HortonWorks Dashboard?

I have installed Virtual Box (Version 5.2.0 r118431 (Qt5.6.2)) on Windows 10 and i imported appliance HDP_2.4_virtualbox_v3 (downloaded from here).
I followed the tutorial from here step by step.
The virtual machine is running on the computer from where I am trying to access the Dashboard. I have set up the Host Only Adapter Option on the sandbox so the computer and the virtual machine can communicate
After the CentOs finished booting I am prompt to enter to the ip 127.0.0.1:8888, which is a different address from the tutorial,
and there is no server listening to that address because i get
"127.0.0.1 refused to connect." in the browser.
image here
Run the ipconfig command in your command prompt and identyfy your virtual box's ip under Ethernet adapter VirtualBox Host-Only Network.
Take that ip address and go to your Virtual Box.
Select your appliance and go to Settings->Network->Adapter 1->Port Forwarding.
Replace the Host IP 127.0.0.1 for the port you need 8080, 8888 and so on with the ip of your virtual box that should be sth like 192.168.x.x.
Now start your sandbox, login on it and try to connect in your browser to the new ip set 192.168.x.x:8888.
Use appliance HDP_2.4_virtualbox because in the most recent some linux commands like netstat are considered deprecated and no longer function, which willmake your life harder when trying to debug or identify a networking problem.
If you still encounter issues eith it, reinstall your operating system, reinstall your virtual box and reimport the sandbox, make the changes needed in the Port Forwarding settings and it should be ok.
try to connect using 127.0.0.1 to connect make sure the VM is running make sure there are no errors if there are debug them and at the last straw uninstall the Vm and retry (make sure to make a backup if there are any files)
you can also try to check all the local host ips on your network and try to connect to them
Make sure you set NAT in your VirtualBox network settings:

Windows 8 VMWare guest under Ubuntu 16.04 host doesn't have access to the internet

I have Ubuntu 16.04 host machine with WMWare Player and Windows 8 guest. The problem is that the guest Windows machine doesn't have access to the internet.
Host Ubuntu 16.04 configuration:
>>> grep VERSION= /etc/*-release
/etc/os-release:VERSION="16.04.3 LTS (Xenial Xerus)"
>>> sudo iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
>>> sudo ufw status
Status: inactive
VMWare configuration:
> vmware --version
VMware Workstation 12.1.0 build-3272444
Windows guest machine:
Testing:
Notes:
Note the ping is ok and nslookup hangs. Looks like host machine is stopping the traffic.
I tried ssh into host - ok.
I tried ssh into other machine within the Local lo network of the host - ok
The gateway in the network config is set to 172.16.223.2. I tried to change that to the IP of the host (172.16.223.1) - same results.
My case was really simple. For some reason VMWare hasn't picked up proper DNS's of the host and 8.8.8.8 and 8.8.4.4 are blocked within the internal network. Setting DNS servers manually within Windows to the IPs that are allowed within internal network fixed the issue.
I am marking the question as resolved, but if smb posts a solution to fix the VMWare to pick-up the DNS's of the host, I will switch to his answer.

Transparent proxy on Mac OS X Lion with Fusion

I have a MacOS X (Lion) with VMWare Fusion installed. In Fusion I have two guests: a Linux and a MS Windows XP. The two guests networking is configured to use NAT thru vmnet8 interface. Both boxes access to the internet just fine by default.
My objective is to force all HTTP (tcp/80) traffic leaving the XP client to be redirected to the Linux client on the proxy port (tcp/8080). The XP client must not be aware of the redirection thus explicit proxy configuration in the XP browser is not an option.
I already tried this setup on a linux host running virtualbox. The iptables nat rules did the trick just fine. But I'm completely lost on how to do this in Mac which is pf based.
I've been attempting to configure a complementary pf.conf (proxy.conf) file with just one line:
rdr on vmnet8 proto tcp from 192.168.190.138 to any port 80 -> 192.168.190.134 port 8080
Concerning the IP: 192.168.190.138 is the XP guest ip and 192.168.190.134 is the linux guest.
I then run the following pfctl commands:
$sudo pfctl -vf ~/proxy.conf
No ALTQ support in kernel
ALTQ related functions disabled
rdr on vmnet8 inet proto tcp from 192.168.190.138 to any port = 80 -> 192.168.190.134 port 8080
and then:
$ sudo pfctl -e
No ALTQ support in kernel
ALTQ related functions disabled
pfctl: pf already enabled
When I attempt to open a webpage on the XP guest pf doesn't redirect the traffic to the linux box. For some reason the pf rule isn't working as expected. Probably because something is missing...

Using gitlab-vagrant-vm from OSX host

I followed the instructions here and was able to succesfully (I think) install the gitlab vagrant virtual machine on OSX 10.8 using virtualbox.
I can do vagrant up to get the VM running, and everything seems to work fine. After that I can do vagrant ssh without a problem. Also, after sshing into the VM I was able to do bundle exec rake gitlab:test, which completed with results being 1584 examples, 0 failures.
I would like to see the gitlab web interface from my OSX host machine. I thought I could just direct my browser to the IP indicated in the VagrantFile (http://192.168.3.14), but that didn't work.
Any ideas?
Also any other usage tips for this setup would be appriciated (things like where the repositories are stored on my host machine so I can back them up, if anyone set the gitlab-vagrant-vm up for external access from either another computer on the network or a remote source, ect.)
You have to connect a second interface for vagrant. To do this you've to edit the VagrantFile.
For example if you want to conenct to the host wifi add the following line after 192.168.3.14
config.vm.network :bridged, bridge: "en0: Wi-Fi (AirPort)"
You also can bridge to the ethernet interface. Use ifconfig on the host machine to determine the right interface. After that the dyndns-server of the host network will assign an IP to the Vagrant-Box. Then you can access GitLab on that IP.
Did you actually start the server? You can do that with
bundle exec foreman start -p 3000
This will start the server on port 3000, you would then access it from the host with
http://192.168.3.14:3000/
Hope this helps,
Chris

Resources