Connect to a local service via VPN - networking

This may be a very obvious question to a lot of people on here. Unfortunately I'm PRETTY bad with networking, nuff said:
I have a local webservice running on PC A, that I can without a problem access (via the lan/the local ip address:port of PC A) from PC B.
What I'm trying now is to connect the same two PC's, while using the same VPN and being in two different physical networks.
My gut tells me, that I need to reconfigure the local webserver (PC A) to the (local) VPN address that got assigned to it, right? Reality is, this solution is not working. Any suggestions?
Cheers.

Related

How to make communicating two machines which are behind their respective NATs with wireguard

I am trying to find a way to communicate two machines (Machine A and Machine B) behind their respective NATs using wireguard. So basically :
I started to make them communicate with an intermediate server located on the internet by creating a UDP hole punching port, so it means Machine A can communicate with the intermediate server and Machine B can also communicate with the intermediate server.
Now, When I'm trying to make communicate Machine A with Machine B by using the hole punching port previously created by the communication between Machine A and the intermediate server, that does not work.
Is that someone who could help me to make it works or share useful documentation?
Thanks in advance

Traffic flow with and without VPN?

I was not able to access an open learning website that was working fine earlier with the same Vodafone network.
To troubleshoot this further I have checked it with another network JIO and found that It is working fine.
So, further, I checked with the Vodafone network by connecting VPN and found that It is working as expected. (If I am disconnecting VPN then It's not working).
FYI:
a)Without VPN with Vodafone Network
(base) Shailesh-Yadav:~ shaileshyadaav$ host website_name
;; connection timed out; no servers could be reached
b)after connecting VPN with Vodafone network
shaileshyadaav$ host website_name
www.web_site_name is an alias for spayeeservers.com.
spayeeservers.com has address 134.2XX.XX.XX
spayeeservers.com mail is handled by 0 smtp.secureserver.net.
It'll be very much helpful to understand working if anyone can help me with below question.
1. I am accessing an open website(not having any restriction) and the same is not accessible with the Vodafone network but observe that It's working when I am connected to VPN. So how the traffic is flowing.
2.Any command through which I can understand the destination route(how it is reaching) OR differentiate the flow path(reason for this).
I have checked it by using the traceroute command and found that the traffic is flowing with different routes(hopes) with VPN and without VPN.
So, It means if we are connected to VPN then all the traffic will go through a tunnel and the site is not working without a VPN maybe some restriction from the ISP side.
(but again one doubt which one is better/faster in performance).

Plumber R, changing 'localhost' to local machine IP as test

I have an R script which is outputs values through an API using Plumber, all runs fine on my local machine (windows 10) when using a 127.0.0.1 or localhost address in the browser, but if I change to use my machines actual IP the browser throws a 'refused to connect' error( I'm running this as a test, before moving everything onto a networked server). Any ideas if this should work? the literature seems to suggest it should...or any tips on what might be preventing this from working?
thanks
You need to replace the 127.0.0.1 by 0.0.0.0 to make your api accessible by your machine ip.
library(plumber)
r <- plumb("api.R")
r$run(host = "0.0.0.0", port = 8000)
You likely have a firewall configured on your machine that is preventing "external" access on your IP address. You'd need to open up a port in your local firewall in order to allow traffic in, but you're probably better off just deploying to an external server so you don't have to start poking holes in your machine's firewall (a real security concern) just as an experiment.
Also keep in mind that "the machine's actual IP address" can be a little ambiguous. If that's the IP on your local network (for example, 192.168..., or 172.16...) then it's probably your machine's firewall like I mentioned above. But if you're using a residential computer and trying to access on your public IP, then there is more networking equipment involved (like your router) that would need to be configured.
All that to say, you're probably going to have an easier time just spinning up a DigitalOcean server and trying to run it there (see plumber's do_provision function) as you won't have to worry about any of these issues there.

Virtualbox incoming connections are the same IP

Okay, so I'm hosting a VPS for someone using Virtualbox. I've setup a server for that guy with a NAT network type ( this way I could port forward the entire thing so it can be used for what the guy wants ). The guy can use remote desktop to connect to the server, however. Everyone who tries to join his game, gets the same IP. I guess this has something to do with the guest settings, if I'm not mistaken.
Could anyone provide me any more information about the reason behind these IP's?
I'm running on the latest version of Virtualbox with a windows 7 enterprise 64bit version where a SA-MP server is being hosted on.
Everyone who connects to his server gets the ip; 10.0.2.2. Any help would be really appreciated
If a machine is located behind NAT, then all of the incoming connection will always be recorded only from a single source, that is you router's IP. It's normal since all of the incoming connection will have to go to the router first.

Connect to my localhost from another computer NOT in the same network

I have a real IP. Or so I think, basically how I tested this is under windows in cmd I pinged my IP address and I got packages back, so that must mean it's real. However when I start my xampp and go to my IP address in the browser I get
Unable to connect
Firefox can't establish a connection to the server
I tried looking up other questions but they didn't help cause all answers I found were suggesting LAN connection. Can you please explain to me any extra steps I need to take or link an answer that does that. Thanks!
The only way to access your localhost from other computers is over a Local Area Network (LAN); whether wired or wireless, there has to be a physical connection between the computers.
Once the computers are connected, you can access your localhost from the browser with the name of the computer on other computers:
http ://your-computer/path/to/files/
It also works on the same computer, so you can test it there.
You can find the name of your computer by going to the "Network" section in Windows Explorer.
EDIT:
If you want to access a localhost from a computer that is on another network, you have to create a web server; more or less what you would be paying for from a hosting company. Here is how you would do it:
http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/

Resources