I set up a php file in my raspberry pi so that I can access some files on it from my local network.
Within raspbian, it works well in any browser using localhost/test. I tested it also in a Windows and a Mac computer in the same network, using my.local.ip.address/test in my browsers and it also worked fine.
Now here is the problem: in my linux computer, it does not work. It simply says that "the site cannot be reached". I already tried disabling the firewall (UFW) but it doesn't change anything.
I also tried several browsers in linux and the result is the same.
I think I am overseeing something obvious but I cannot see it.
Could someone give me a pointer on what might be wrong?
ifconfig -a output (Linux machine)
ifconfig -a output (Raspberry Pi machine)
It's possible that your Ubuntu machine is not in the same network. You can try theses steps to confirm :
Ping
Go on your ubuntu machine and type :
ping <rasp.pi.local.ip.address>
Go on your Raspberry Pi and type :
ping <ubuntu.local.ip.address>
If the ping request do not succeed your machines are probably in different networks. Your can use this command to watch the path used by packets between your ubuntu machine and your Raspberry Pi :
traceroute <rasp.pi.local.ip.address>
Change network card settings
Before this step, check if your are able to connect your machines togather (switch, router, vlan...).
ifconfig <interface> down
ifconfig <interface> <ip.network> netmask <netmask.network>
ifconfig <interface> up
After completing theses steps try to ping again and access to your website.
Related
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.
I wanted to ssh into Kaa's sandbox using ssh kaa#127.0.0.1 -p 2222 given in the virtual machine to us and also in one of the Data Collection demo where it said that we need to ssh into kaa's sandbox then we can see our mongoDB using our application token of our demo to see data saved into it.
But we do know the password is kaa123. But I tried 4 times, it shows permission denied, please try again until it shows permission denied (publickey,password).
ThusIi would like to seek help. I haven set up anything apart from downloading cmake, gcc. I changed the port on Raspberry pi to port 2222. Raspberry pi is connected to my computer using an Ethernet cable.
Raspberry pi static ip address : 169.254.220.68
Computer static ip address : 169.254.220.135
Kaa's sandbox ssh address is : ssh kaa#127.0.0.1 -p 222
Your answers are really very very important to us as we have been stuck for days for our mini Final Year Project.
As I understood, the situation is next:
Kaa Sandbox is running in VirtualBox image on host 169.254.220.135
Raspberry Pi has IP address 169.254.220.68
You tries to get to Kaa Sandbox by ssh from Raspberry Pi
Kaa Sandbox shows in terminal that you can access its SSH via localhost (127.0.0.1) port 2222
If that is correct, the technical details are as follows:
You should be able (if you didn't change Kaa Sandbox configuration) to access the Kaa Sandbox from your VirtualBox host just as it is shown in the Kaa Sandbox terminal:
ssh kaa#localhost -p 2222
Please try this first. Should this fail you will not be able to pass the further checks below.
The Kaa Sandbox is shiped with NAT networking mode configuration. This means (among other things) that its internal IP addresse(s) (including 10.0.2.15) cannot be reached from outside. That is, you cannot connect to this address from Raspberry Pi and even from your VirtualBox host. NAT hides them under the VirtualBox host IP address.
To enable access to the Kaa Sandbox from outside we pre-configured the Kaa Sandbox VirtualBox image to forward several ports from your host IP address to the internal IP address (10.0.2.15) which is under NAT. The port forwarding configuration is next:
${HostIP}:2222 -> 10.0.2.15:22
This means that all the connections to ${HostIP}:2222 will be forwarded to the Kaa Sandbox's 10.0.2.15:22.
Thus:
You should be able to get Kaa Sandbox SSH locally by kaa#localhost -p 2222 and by host IP: kaa#169.254.220.135 -p 2222
You need to use your host IP from remote: kaa#169.254.220.135 -p 2222
Please let me know if something is unclear here or does not work for you.
127.0.0.1 always points to your own computer. If kaa's sanbox is in your Raspberry Pi, try ssh kaa#169.254.220.68 -p 2222
I am trying to scan wifi networks via Linux terminal running on a virtual machine. I am running virtual machine on Mac OS. On MAC terminal, I can see all WIFI networks using (airport) command and can connect to one network.
The NetworkAdapter setting for Vistual machine is set to "Share with MAC".
On Linux terminal, When I do ifconfig -a, I get
eth0 & lo
However, when I type : sudo iwlist eht0 scan , I get error message:
sudo iwlist eht0 scan
Can someone help that how I can do that with Linux running on virtual machine ? ? What I am doing wrong . .
On every VM I've ever seen, the virtual machine emulates the WiFi interface of the host OS (Mac) as an ordinary wired interface to the guest OS (Linux). Therefore you can't scan for WiFi networks from the Linux, because as far as it's concerned, it's not a WiFi interface.
The exception to this would be if you attached a USB WiFi adapter and had the guest OS natively recognize it as a USB device (meaning it would be ignored by the host OS). Note this may not work on some virtual machines; VirtualBox is particuarly bad at recongizing network adapters.
well if you:
nmcli dev wifi
it will show you all the wireless access points (ESSID) available then you can
nmcli dev wifi connect $ESSID password $PASSWORD
example
nmcli dev wifi connect "School Hotspot" password "q5w4e3r2t1y0"
That kinda thang :-)
I created a ubuntu server on vmware. I am using it as a file server. I can access it if I am connecting through the machine which hosts the virtual machine. I am not able to do it from other machines which are on the same network. Thanks in advance!
First of all make sure in the setting of the virtual machine that it is in Bridged Adaptor type connectivity.
Give a static ip to the virtual machine using
sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0
the above is an example. You got what I mean.
3.Third, Try pinging the virtual machine with the base machine running the vbox to make sure they are connected.
ping ipaddress-basemachine
4 . Now if everything is working fine from there then connect with this virtual machine with other base machine using Remote Desktop Viewer or any other similar application.
Specify, the ip-address of the vbox and username, password. It will be able to connect with it now.
5 . If it still is not able to then try to check the firewall rules on both the virtual box machine and the base machine running the vbox using the command
iptables -L
How do i configure ethernet or wifi on laptop, i followed this tutorial and my ethernet started properly and still i couldn't receive any packet from ping 8.8.8.8 dns, i have ethernet and wifi on my laptop... same setting on virtual machine works perfectl but on real os it wouldn't work... if i ping
ping 127.0.0.1
or
ping localhost
what could be the problem???
It could be that your interface is down.
ifconfig eth0 up
Eth0 is an interface name to get the list of your visible interface type in "ifconfig"
also you should provide us with the list of interface and possibly also hardware
dmesg
will display the full list of device on your laptop.
Also to be noted some of these command requires root / sudoer.
Wifi : http://wiki.centos.org/HowTos/Laptops/Wireless