i Have created a local web app hosted on my raspberry pi. I want to access the web app from outside so outside the local network.
To do that, I have configured dmz and I have added my raspberry local ip address.
Now how can I get the raspberry public ip address?
I have tried to use the bash commands: curl checkip.amazonaws.com. But the ip address i get is the same as my computer
How can I solve it? how can i access the raspberry from outside?
P.S: I control my raspberry via ssh
thank you :)
Your public address is the same for every device on your network because it's the IP address devices OUTSIDE of your local network see as illustrated by this quick diagram I've made.
If you want to access your local webserver you need to tell your router to forward requests to a given port to a local network address. So assuming your webserver is running on port 80 you need to tell your router to forward requests to 192.168.1.50 (assuming your RPi local address matches the diagram's) 🙃
Related
I am facing a strange issue these days. I have a list of IP addresses which I want to connect to during the deployment using Jenkins. Now what is happening is, if I am deploying at one IP address (remote machine but in same location) in my local location server, I can successfully do that. But If I am trying to deploy to an IP address (remote machine in other country/region) It is throwing the error, saying
Error : Ip address XYZ is not reachable or is invalid.
Please be notified that I am able to get the response from the machine when I ping it using:
ping XYZ
But while trying to deploy on it using Jenkins, I am not.
Please let me know if there's any solution for this problem.
There isn't enough data points but you can look for these things
1. IP address, Check if all three machines are in same n/w (Jenkins Server, target and your machine)
You can check it with IP address of each machine
2. check Gateway set for Jenkins server
3. Best way if feasible is to ssh / rdp to your Jenkins server and try running your command manually that will give you
Local machine get loopback address(127.0.0.1), so it will be reachable or any local machine having IP address with same subnet mask thats called LAN.
When you are reaching out to remote machine, either it should be public IP address(visible to everyone in the world) or you must have connect to that Area-Network via VPN, this is called tunnelling to remote over the WAN (wide area network). Their(remote location) again, you will notice that all the IP address have same subnet mask as you have on the local machine.
So their could be be IP address duplication case in VPN scenario, where you are bale to ping but not able to reach. This is because, IP address is assigned to other machine but not you yours and ping responses are coming from that other machine. That means your machine is in failed to resolve ARP and in dormant state.
so I am setting up my home network with multiple Raspberry Pis and I have run into an issue, which might be similar, but not exactly identical to some other queries here on stackoverflow. I am just starting so this might be a pretty newbie question.
Here is the setup: I have a router (a pretty shitty one as we rent the apartment from someone who had the network set up) and want to connect three Raspberry Pis with different functions:
RPi 1 is running a Apache2 Webserver and hosting my owncloud instance. As I do not have a static public IP I am using noip.com to dynamically update a domain to resolve to my current IP - address.
RPi 2 is running a VPN service which I want to be able to use while being on the road, e.g. in Internet Cafés and such.
RPi 3 has a RPi Noir Camera v2 and serves as a Baby Monitor which is accessible via its private IP address within the network.
So, here comes the question: is there a way to access each of these raspberries via their private IP addresses from outside my network?
I.e. I want to be able to access the owncloud, the VPN and the baby monitor via their respective private IP - addresses? Or do I need to find a way to run all these services on a single machine?
Thanks and sorry for asking basic questions.
This can be done via port forwarding on the router.
For example:
for external IP / port 1234 -> forward to internal IP (and possibly different port) of RPi 1
for external IP / port 1235 -> forward to internal IP of RPi 2
and so on..
I use port 1234 as an example for the webserver, because there could be problems when using port 80 on a home network. To access it you can use yourPublicIP:1234/index.html (or dynamic_domain:1234 )
i have problem with access to server with domains.
Test url: testpage.example.com.
Server is in local network with port fowarding (80, 443), configured as web server using caddy server as reverse proxy.
Case 1 (using Asus router):
Connected on local network behind router. Server is in the same network as my computer. Everything works like a charm in and out of my network.
Case 2 (using internet provider router):
Connected on local network behind router. Can't access server with domain. Works with direct IP. Outside network, works as in case 1.
I used same server.
Does anyone know why this problem occured? How can i solve it?
Thanks,
David
Two options I can think of:
You could add a record to whatever DNS server you're using in Case 2.
You could write a short script that runs whenever you change network connections to modify your hosts file accordingly.
This happens when the server you are trying to reach "testpage.example.com" resolves to your router's external IP address. Because your public IP address is the same as server's IP address (even though inside your home network you have different private IP addresses) your requests are lost in the ether.
As a workaround you can resolve the testpage.example.com manually on your local machine.
For Windows c:\windows\system32\etc\hosts
For Linux /etc/hosts
testpage.example.com 192.168.1.102 -> private IP of the machine serving the site.
Hi I am trying to make my router(TPlink router) to forward port by configuring it and by creating NAT virtual server or port triggering. Firstly the port doesn't open which I have checked via an online website, the port is closed. Secondly if the port does open, would I be able to access my computer or computer server or a website hosted on my wamp server externally via another network from some other place externally? I am not sure what are the things on my computer that I would be able to access from outside? How exactly am I going to do it? I am aware that I am going to use my router external ip address which I know and the port that I have associated with the ip address of the computer I am trying to access. I am just a beginner but I am really into networking. Can somebody explain the entire process please?
Your local host can be accessed from anywhere in the world.
Just use put the ip of the pc/wamp server installed pc in the DMZ Box under Forward Menu of your tp-link router & enable DMZ option.
I'm working on a website for a friend, developing using Eclipse/Tomcat. I'm running it locally and trying to open it via my internet port IP address, but I can't get it to work. The computer I am running it from is connected to a router, so it is running off of 192.168.1.4, and http://192.168.1.4:8080/Mobile_Site/index.jsp works. However when I try and open it via my internet port IP, http://67.xxx.244.xx:8080/Mobile_Site/index.jsp it doesn't find it from any device, even outside my local network. Is there a way to send the link when running locally when connected to a router?
You have to configure your router port forwarding (or virtual servers depending on the router) to forward TCP connections from 67.xxx.244.xx:NNNN to 192.168.1.4:8080.
Then you give the 67.xxx.244.xx:NNNN address to your friend.
Note: NNNN at your router doesn't need to be 8080, as long as the port forwarding is set properly.