I'm running a webserver on my Windows machine on port 4200. If I open a browser, I can communicate with that webserver by going to localhost:4200
I'd like to connect to the webserver from within the Windows Sandbox. My sandbox configuration allows for networking, and a browser in the Sandbox can browse the internet just fine. However, it cannot reach my webserver by going to localhost:4200. I assume this is because localhost refers to the Sandbox itself.
Here is my wsb configuration. Again, internet access works.
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Users\JohnDoe\Documents\Sandbox\Share</HostFolder>
<ReadOnly>false</ReadOnly>
</MappedFolder>
</MappedFolders>
</Configuration>
How can I reach my webserver on the host machine from my browser in the sandbox?
Sandbox localhost is different than your host.
Get the "Ethernet adapter vEthernet (Default Switch):" IPv4 Address from host and use it in your sandbox browser
Ex:
From within sandbox, I can ping the host:
Pinging 172.20.160.1 with 32 bytes of data:
Reply from 172.20.160.1: bytes=32 time<1ms TTL=128
Reply from 172.20.160.1: bytes=32 time<1ms TTL=128
Reply from 172.20.160.1: bytes=32 time<1ms TTL=128
Reply from 172.20.160.1: bytes=32 time<1ms TTL=128
I could access my localhost app from a sandbox browser by browsing
http://172.20.160.1:<app_port>
Related
As the title suggest, I want to basically disable the public TCP port and allow plex or other apps to only connect using Tailscale.
Like, I don't want to allow server-public-ip:32400, but instead I wanna do tailscale-server-name:32400.
If I have the port opened in TCP for all sources it works, doesn't work when I remove the ingress rule.
The server pings fine (MagicDNS enabled)
Pinging oracle.hidden-name.ts.net [tailscale-ip] with 32 bytes of data:
Reply from tailscale-ip: bytes=32 time=36ms TTL=64
Reply from tailscale-ip: bytes=32 time=36ms TTL=64
Reply from tailscale-ip: bytes=32 time=38ms TTL=64
Reply from tailscale-ip: bytes=32 time=37ms TTL=64
Ping statistics for tailscale-ip:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 36ms, Maximum = 38ms, Average = 36ms
Figured it out. It won't work with only machine name as it won't resolve HTTP/S, will work with Tailscale IP or the ts.net domain.
If I have the port opened in TCP for all sources it works, doesn't work when I remove the ingress rule.
That likely means the apps connecting to plex are still using the LAN IP address, not the Tailscale IP address. Using MagicDNS might help, the Plex app can be told to go to plex.example.com.beta.tailscale.net.
I have been trying to create my own server using cyberpanel on vultr I already created my email and issue ssl and configured my dns and my reverse dns but when I login to my rainloop my message would be sent but won’t deliver but if I send a mail to my rainloop mail account I get it quickly but can’t reply from my rainloop,I have tried setting up my imap and pop3 in the rainloop admin to connect it with gmail still the same way please what should I do
Have you verified the ports are open? These ports are blocked by default at Vultr. You may request removing the blocks by opening a support ticket.
TCP port 25 (SMTP)
TCP & UDP port 137
TCP & UDP port 138
TCP & UDP port 139
TCP & UDP port 445
TCP port 1688 (KMS, inbound only)
There are three SSL options on CyberPanel, you need to select email SSL for your email to work
Every provider blocks port 25 to control spam. Contact your ISP or if you are hosting your server on Digital Ocean or AWS request them to unblock port 25 ( They never agree, at least for me )
I am running xampp on windows 7. When I do http://localhost, I get the xampp welcome screen in my web browser but http://127.0.0.1 does not work. In my windows hosts file, I have uncommented 127.0.0.1 localhost but the problem still exists. I have checked to see if firewall is blocking anything but still no good results.
How do I resolve this problem.
Two or three shot in the dark guesses. This is how I would diagnose the issue.
It's possible that your web browser is resolving localhost on your computer to the IPV6 loopback address, ::1. Compare the results of typing http://[::1] and compare the results to http://127.0.0.1 and http://localhost to see if that reveals anything. As to why xampp is working on IPV6, but not IPV4 is another issue.
You might have a web proxy installed on your network and your Internet Options or browser settings is configured to use it. This will bypass DNS and the hosts file and send the request straight to the proxy. And the proxy server probably resolves 127.0.0.1 and localhost differently. This also applies to any sort of local proxy, internet speed-up software, anti-virus scanner, Fiddler, etc... Try going to Control Panel->Internet Options and select the Connections tab. Then select the "LAN settings" button. Make sure all the checkboxes are turned off on this dialog. Run the "Setup" button at the top of the Connections dialog just to be sure. See picture below
Disable the Windows Firewall and/or any other sort of Firewall software you may have. Just so we can rule that out. Any change?
But your BEST option will be to install Wireshark or Netmon and get a trace of http://localhost connection and compare that to the http://127.0.0.1 address. That should reveal something...
netsh http add iplisten 127.0.0.1
This should do the work
What I had to do was:
1) Make sure I had all files located inside of C:\inetpub\wwwroot backed up somewhere, just in case.
2) Go to the windows search OR control panel and openTurn Windows features on or off
3) The box next to Internet Information Services needs to be checked (it will appear as a green square inside of the grey square).
4) Now I can type 127.0.0.1 or http://localhost and get the correct page which should look like this image
5) Profit.
I personally couldn't get 127.0.0.1 working on it's own in the Apache httpd.conf file. So I added a port number at the end. Usually it's just :80.
However, I have Skype running on my machine which causes a conflict so I use port :8080.
Listen 127.0.0.1:8080
Is what I have in the config file and in the browser I enter:
http://localhost:8080
This works and keeps it on local only. You can either type in localhost to find your apache server or your local ip address. You can find your local ip address in cmd with an ipconfig command.
Here is a simple solution taken from here
Increase the priority of IPv4
Microsoft Windows [Version 10.0.19044.1826]
(c) Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>netsh interface ipv6 show prefixpolicies
Querying active state...
Precedence Label Prefix
---------- ----- --------------------------------
50 0 ::1/128
40 1 ::/0
35 4 ::ffff:0:0/96
30 2 2002::/16
5 5 2001::/32
3 13 fc00::/7
1 11 fec0::/10
1 12 3ffe::/16
1 3 ::/96
C:\WINDOWS\system32>
C:\WINDOWS\system32>netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 55 4
Ok.
C:\WINDOWS\system32>
C:\WINDOWS\system32>netsh interface ipv6 show prefixpolicies
Querying active state...
Precedence Label Prefix
---------- ----- --------------------------------
55 4 ::ffff:0:0/96
50 0 ::1/128
40 1 ::/0
30 2 2002::/16
5 5 2001::/32
3 13 fc00::/7
1 11 fec0::/10
1 12 3ffe::/16
1 3 ::/96
Here is the result:
C:\WINDOWS\system32>ping localhost
Pinging Sumonst21 [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\WINDOWS\system32>
Hope this will help someone coming to this thread by 2022 :)
If localhost working and 127.0.0.1 not working
Try 192.168.1.1 or 192.168.1.(your system number)
It should work..
I am trying to create a VB .Net program that determines if a device is on my wireless LAN (with DHCP enabled) so I can take specific actions depending on the device there or not.
Often when I query the arp cache (using a reverse lookup routine I wrote) to determine if the device's MAC address is present, I fail to find it because the device cache timeout has expired and the device has been removed from arp.
Because the device uses DHCP to get it's IP address, I cannot query the arp cache with a "known" IP address but must use the MAC address to identify the device.
Since I am trying to quickly discover if the device is turned on or off, I want to establish whether my MAC search failure was a result of an expired cache entry or the device really being turned off.
Is there any way, knowing only the device MAC address, to force it to be be known again to arp so I can try searching the arp cache again in 30 seconds to see if an entry appeared?
If you're on the same subnet as the device, and the device will respond to broadcast ICMP pings, you can send a broadcast ping.
In my example, my machine is 129.21.49.41 on the subnet 129.21.49.0/24 (49.0 through 49.255).
The network address for such a network is 129.21.49.0 (first address)
The first assignable address is 129.21.49.1
The last assignable address is 129.21.49.254
The broadcast address is 129.21.49.255.
Here's an example:
angst(~) > ping 129.21.49.255
PING 129.21.49.255 (129.21.49.255): 56 data bytes
64 bytes from 129.21.49.254: icmp_seq=0 ttl=255 time=0.316 ms
64 bytes from 129.21.49.205: icmp_seq=0 ttl=64 time=0.422 ms (DUP!)
64 bytes from 129.21.49.148: icmp_seq=0 ttl=64 time=0.703 ms (DUP!)
64 bytes from 129.21.49.31: icmp_seq=0 ttl=64 time=0.766 ms (DUP!)
64 bytes from 129.21.49.23: icmp_seq=0 ttl=64 time=0.822 ms (DUP!)
64 bytes from 129.21.49.246: icmp_seq=0 ttl=64 time=13.538 ms (DUP!)
^C
Those are all of the machines on my subnetwork that are online that are configured to respond to broadcast pings.
In my case, from a hardware UDP packets are sent to destination PC - 192.168.13.250 (45141) but MAC ID is FF:FF:FF:FF:FF:FF. Now I binded to that destination IP & port no using sockets. But I'm not able to receive UDP packets form PC using socket program. It is not coming out of recvfrom() call. Still it is waiting. If I change the MAC ID to destination PC MAC ID(00-12-d5-f6-3e-92) using hardware settings, then I'm able to receive UDP packets. Without changing the MAC ID, i.e, How to receive UDP packets from broadcast MAC ID. Any help would be highly appreciated. Thanks in advance. Following is the log from Wireshark.
With following UDP packets are not received (Wireshark)
Frame 3609 (7978 bytes on wire, 7978 bytes captured)
Ethernet II, Src: 0a:dc:0a:dc:0a:dc (0a:dc:0a:dc:0a:dc), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 192.168.13.25 (192.168.13.25), Dst: 192.168.13.250 (192.168.13.250)
User Datagram Protocol, Src Port: lbc-control (2780), Dst Port: 45141 (45141)
Data (7936 bytes)
With following UDP packets are received (Wireshark)
Frame 3609 (7978 bytes on wire, 7978 bytes captured)
Ethernet II, Src: 0a:dc:0a:dc:0a:dc (0a:dc:0a:dc:0a:dc), Dst: Broadcast (00:12:d5:f6:3e:92)
Internet Protocol, Src: 192.168.13.25 (192.168.13.25), Dst: 192.168.13.250 (192.168.13.250)
User Datagram Protocol, Src Port: lbc-control (2780), Dst Port: 45141 (45141)
Data (7936 bytes)
RFC 1122 section 3.3.6 states:
"When a host sends a datagram to a link-layer broadcast address, the IP destination address MUST be a legal IP broadcast or IP multicast address."
If you want your PC to receive the UDP packet with a broadcast MAC address, you should also be using a broadcast IP address.