Phone cannot access sites being served by localhost(lite-server) on same WiFi network - node.js

Searched all over the place for a fix for this or even a good way to troubleshoot it. I've read the previous SO threads that seem to cover this issue but nothing in any of them has worked in my case.
Basically, I can't get access to anything that is being served via localhost on my mac in any browser on my Android device.
This is happening despite the fact they are connected to the same WIFI network and I am using the correct network address for my mac on which localhost is running (I have checked and double checked several times). I have no idea what the problem is because it worked perfectly fine before and I haven't changed anything that I believe would interfere with localhost access.
I don't have firewall or port blocking settings on my router either.
I have also tried on several different Android devices to eliminate it being a problem specific to one particular device.
Totally stumped. Any clues or hints on how to fix this would be much appreciated!
***** UPDATE *****
I tried using python -m SimpleHTTPServer 3000and it works. The site is accessible on my Android device. So I am pretty sure it is not a network issue per se.
The site is essentially a Node app which I built using the angular-quickstart template found here. It launches lite-server when npm start is run. Hope that gives some further insight into what the problem might be.

If you open up a terminal on your mac and then run the command ifconfig it will tell you what ip address all your interfaces have. It is probably your en0 interface. That ip address should be used in your browser on your Android device.
You will have to make user that you server (web) is binding to the correct ip address as well. You could be binding to all ip addresses if possible.

Related

Yabe on Linux unable to locate bacnet device

I have a Win11 laptop and I installed Yabe and was easily able to explore bacnet objects on my home thermostat. I'm trying to duplicate this on a Linux Laptop. My issue is that Yabe is not finding my thermostat on the Linux machine.
I'm running Linux Mint 21 Cinnamon 5.4.12. I installed Mono and downloaded Yabe. I am running with command "mono ./Yabe.exe". The Win11 laptop rules out thermostat setup/network issues. In the Yabe log window I get a message that says "error loading plugins". I did't try to install any plugins so I don't know where this is coming from and I'm not sure if it's even the root cause. Initially I just left the Yabe folder in my downloads folder. I also moved it to /usr/bin but that didn't solve anything. Any suggestions would be appreciated. I would really like not to have to use Win11 as it is a memory hog.
A similar question was raised on sourceforge but the answers have not helped me.
https://sourceforge.net/p/yetanotherbacnetexplorer/discussion/general/thread/1e78874922/?limit=25
Thank you for the suggestions. I ran Wireshark capture with filter "udp and port 47808" and received i-Am 100001 from the thermostat at 192.168.0.150 which is the static address I assigned. Like I said, since I literally have a Win-11 laptop sitting beside this one with Yabe installed and it sees the thermostat just fine, that rules out most network router issues. Also, I currently have the Linux firewall turned off. I believe it must be some bug with the Yabe installation on this version of Linux. I keep wanting to get away from Windows and rely solely on Linux and then I run into issues like this that make me realize why it's not universally adapted in industry.
At least for Windows, I believe that the plug-in DLLs are not strictly necessary/important; and you could drop the relevant plug-in DLLs alongside the 'YABE.exe' binary (- within the same folder); I've included a picture of plug-in DLLs' filenames.
Is both the (BACnet) client machine and server/thermostat machine using a public IP address, or at least a private IP address within the same subnet/network address range?
Have you got a Linux (and/or Windows) firewall blocking communication?
Can you see the 47808 port # open using the 'NMap' tool?
Also - for generic reference, an answer of mine for a half-similar question (- some points are could also be relevant here):
Things worth considering :-
Tools such as YABE, VTS and Wireshark - to learn from the success cases/successful instances of communication.
The network card (NIC) that your tools and/or libraries are using/selecting to send the ('service' request) messages - e.g. definitely don't mix routable addresses with non-routable 'private' addresses (between the BACnet 'client' IP & the 'server' IP).
(UDPv4-only) 'Broadcasts' will only work upon the local network (- if a BBMD is not present & correctly set-up to relay the broadcast on to another part/hop of the "internetwork"/connected networks).
If you're unlucky - with a particular device, your client port just might have to be 47808/0xBAC0; and just possibly for the broadcasts too.
Also try directed/'unicast' traffic/'service' requests too - e.g. attempting to read the device object instance # (DOIN) of a target device; check you've got/are specifying the correct DOIN when targeting/firing a request at a device.
Does the target device have a BACnet router or BACnet gateway in front of it (- therefore would also need the inclusion of a DNET & DADR paired values as part of addressing it)?
If so, are you talking the same variant of BACnet, e.g. IP - as in BACnet/IP between both the (BACnet) 'client' & 'server'/serving device?
If it's a commercial/enterprise device, does it have a IP whitelist - to allow for the processing of incoming requests?

how to enable wsl to respond to broadcast ping request

I was using WSL to run ROS commands, and at a point i had to enable system to respond to broadcast icmp requests (for a multi master kind of a setup) i.e. on linux i had to make sure
cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
returns 0. but WSL does not contain such a file, so i was thinking of enabling it on windows. All the sources i have gone through suggest me to add a rule to firewall but my system is not responding to broadcast ping even when my system's firewall is turned off(domain, private and public have been turned off same with my buddy who is no the same network). i am using an android phone's mobile hotspot to check this.
it would be great if someone could help me on this.
thanks in advance.
I asked something similar
I don't know how to do it purely on WSL. But on windows you have to start the "TCPSVCS.EXE" process. located on System32

Issues SSHing to Raspberry Pi From External IP

I've been trying to SSH to my RPi from an external network for a while with little luck. I've followed all the guides and they say all the same things: get SSH set up, port forward on port 22, and then connect using your external IP address. I've been able to easily SSH to the RPi using my internal IP from the same network with no problem, but not from my external IP. This is my configuration for port forwarding:
That is the internal IP for my RPi's ethernet connection. I've tried it with the IP for WiFi as well and it just has the same effect. When I try to SSH using my external IP, it just times out no matter which internal IP is port forwarded (ethernet or WiFi). I've tried it both on PuTTY on my PC and from my Macbook using
sudo ssh pi#my.external.ip.address
It still just times out. The only thing I can think that might be happening is some issue with a firewall, but I have no idea how firewalls work so if this has been seen before and it is a firewall issue, more detailed guide would be nice.
Even if the issue is not known, is there any way to debug the SSH call and see where exactly it's failing when I use the external IP? Any kind of help is greatly appreciated.
I recently struggled through a lot of this with my pi. As alvits suggests, if you are trying to connect to the pi via the LAN it probably won't work. You need to test from an external IP address.
You shouldn't need to sudo either.
If you are still using pi/raspberry as the username and password, change ASAP. Once the firewall is open it won't take long before you start to see bots trying to log in. I think it was about 30 minutes on my machine. It was interesting for a few days, then annoying. Almost all attacks stopped when I moved off of port 22.
According to this page, it does not appear that my router supports SSH. I was able to find guides online of how to enable it using custom firmware, however I probably won't be attempting that. Thanks for the help anyways!

Problems connecting two laptops using a cross-over cable?

I connected two laptops using a cross-over cable. My IP Address is 192.168.1.1 and the other IP Address is 192.168.1.16. We both are able to ping each other and the reply is perfect. There is no loss of packets.
The problem is I shared a file and the other system is not able to open my IP Address using the run command. Even I am not able to open my Shared folder by giving in the run (\\192.168.1.1). A dialogue box with the message \\192.168.1.1, The Network Path was not found opens each time we try this.
But I am able to open his shared folder by giving in run command (\\192.168.1.16). I closed all the firewall services in my system. But still my system is not able to respond. Also we are not able to use remote desktop connection.
Can anyone please help me in solving this?
Additional Details: I use Windows XP and the other machine uses Windows 7. We both are in the same work group.
Here are some steps to solve your problem:
Did you set the static IP by yourself or that come automatically?
If yes then please go and set the IP manually
Then share the file and put the permission of that file to Maximum (If you believe your partner)
Then power down the firewall or antivirus for some moments (say 10 minutes)
Now try to connect using the \192.xxx.xxx.xxx method using the Run window
If the 5th step is not working, then try disabling and reenabling the LAN card, then try the 5th step again.
Hope that solved your problem.
Remote Desktop needs to be explicitly enabled. Right click on "My computer", go to properties and look at the remote settings tab.
I advice you to use Radio Access Point to connect both windows 7 and windowsXP. I think this is best choice of troubleshoting jaringan. why?
Because I already do anything to connect both Operating System but can't solve that problem.

andlinux slirp network failed

I have installed andlinux Beta 2 on my WinXP. Everything works fine until last night, I don't recall that I ever changed anything on network configuration or andlinux setup, the network stop working inside andlinux. With that said, I mean open a KDE console, I do "ping yahoo.com", I see DNS is resolved correctly, however, no response at all.
My andlinux is startup as a WinXP service. Open windows task manager I can see following services are up and running:colinux-daemon.exe colinux-net-daemon.exe colinux-slirp-net-daemon.exe
On andlinux side, there are two network interface eth0 and eth1. eth1 is configured to communicate with local WinXP. I configured it to use samba to access windows directories, no problem. From WinXP side, I can use ssh to login into andlinux box via eth1 IP address.
eth0 is configured as slirp, no port forwarding. eth0 has IP=10.0.2.15, default gateway is 10.0.2.2, netmask=255.255.255.0; These are configured in /etc/network/interfaces. DNS is 10.0.2.3, which as I just mentioned resolve yahoo.com correctly.
On the windows side, internet works fine. I disabled firewall on all network interface. I rebooted my laptop, no luck. I searched over inet, seem no one has this problem. People say network is done if they kill the colinux-slirp-net-daemon. What frustrated me is that this whole thing worked well, but for no reason it's broken all the sudden. Anyone has experience on this issue, please help, appreciate!
I thought I had the same problem, but then found my andLinux system's network connectivity was actually working fine, and that several things made it difficult to tell what was going on.
Test I did to validate connectivity: wget www.yahoo.com
Behavior I observed that made troubleshooting difficult:
Pings from andLinux - not all hosts will respond to pings from the andLinux OS (ie Ubuntu, not the Host Windows OS). According to my packet captures the pings appear as UDP pings instead of ICMP pings once they leave the host OS's adapter. The major IPs/hosts (like yahoo, google, 4.2.2.2 etc.) on the internet I usually ping to test connectivity currently don't respond to these type of pings.
Traceroutes from andLinux - even when successful, these never show more than 2 hops when done from the andLinux OS. If successful, both hops show 10.0.2.2. If unsuccessful, the second hop just times out. Not sure why, I'm sure there is an explanation.
Packet captures - at the host OS level, the capture (eg wireshark) must be done on the physical interface the traffic is going over. I was initially capturing on the TAP-Win32 Adapter but this only showed X Window traffic.
Installed apt sources URLs no longer valid - Ubuntu 9.04 is long out of support by now, so the URLs in the apt sources.list file didn't exist anymore. This is what got me thrown off in the first place, because I didn't troubleshoot this specifically and just tried to test my internet connectivity first, then got confused by the ping and traceroute behavior seen above. Changed http://us.archive.ubuntu.com/ubuntu to http://old-releases.ubuntu.com/ubuntu/ in sources.list and was good to go.

Resources