Set up behind a router (192.168.1.1)! Able to access my website in apach2 via 192.168.1.2:8008 how do i access it when i type my ip address (from whatsmyip.org); where i want to access the webserver remotely!
If there is only a router between your network and your ISP (the internet), then you just have to go into the configuration page of your router and forward port 8008 to 192.168.1.2. Then typing 1.2.3.4:8008 (replacing 1.2.3.4 with your external IP from whatsmyip.org) should, if there are no other devices or firewalls in place, display the webpage.
If you tell us what model your router is, we can be more specific on how to actually forward the port.
Related
I am a novice at networking, I have a NodeJS server running with server.listen(3000, '10.0.0.7'); and have forwarded port 3000 with the internal IP address of my server being 10.0.0.7. I can connect from another machine on my network by putting in the browser: 10.0.0.7:3000. It is my understanding that my external IP address should connect me to the router which should then forward me to the server I have set up on 3000.
Am I missing something important? Because I am unable to connect via the external IP address.
Also please note that my firewall is disabled.
I am neither a network expert so excuse me if I use any incorrect terms. In my understanding, you are right about the current configuration, however you are missing the last step. By default, your router makes your LAN unreachable from a so called “external ip”. Just for the definition: external ip in this case is every ip that is not in your LAN. Imagine if your router would allow any communication without you explicitly giving permission. Every open port on your LAN would be available for the network that your router connects to. That is definitely not desirable.
Lets look at it with an example, quoted from this article:
your router has an ip of: 5.6.7.8 if you access it from outer network (internet)
your router has an ip of: 192.168.1.1 if you access it from your LAN
your laptop is in your LAN and has an ip address of 192.168.1.10 and you want to expose port 3000 from your laptop to the outer network (internet)
You have 2 options:
You can expose the port via the configuration of the router (e.g.: you map 5.6.7.8:3000 to 192.168.1.10:3000 in the router configuration and now it will be accessible from the outer network on 5.6.7.8:3000. Note that you can choose any free port, ports don’t have to match.). Of course it is only possible if you have the option to configure the router and you are willing to do so. (e.g.: if you are not in a café)
You can use some tunneling tools like Ngrok or OpenSSH, which make a direct tunnel between the external machine and your server. This can also work if you don’t have the ability to change the router configuration.
Hope I was able to help. Good luck.
I am working on IOT project in which I have to change some variables(fans speed, lights, etc). So just as a starter, I created a node.js server and tried to send requests to the server through a local network using local IP as
http://localhost:7000/users=mandar?lights=OFF
or
http://192.168.43.248:7000/users=mandar?lights=OFF
and it works fine.
Now I want to do the same over the internet. So I got Computer's IP address from https://www.google.co.in/search?q=myip and tried to send a request to the following URL:
http://(IP_address):7000/users=mandar?lights=OFF
This time it keeps on loading and finally shows this site can't be loaded.
So what is the right way to connect to the server through the internet?
Thank you.
You have to do port forwarding.
The IP address you get from the google search is the out-facing IP address of your router. However, your router knows your computer by your local IP address (i.e. 192.168.x.y).
You have to configure your router to send packets coming from internet destined to port 7000(or any other port) to your computer's port 7000.
Check your router's documentation on port forwarding. Likely there is a settings page on the web interface of your router that you can do the desired port forwarding. After configuring the router, there are several tools online to test if the port forwarding is actually working. I suggest you use one of those tools to verify the configuration before testing with your project.
You also might want to check if your router has a firewall. You can add an exception to the firewall such that a specific port number is reachable from the internet.
My partners can send http requests to my domain, like this:
https://www.example.com/getrequest/
As my domain is public.
And I have also enabled CORS.
How to enable such a thing with my localhost during development?
I have tried to visit my Node.js server with my IP address in the url bar in the browser of a different device like this:
http://myip:8080
But it asks for the WiFi password.
How make my IP available for incoming requests, just similar to my VPS so it will be available to development with partners?
Thanks.
In order for your computer to be accessible from the internet you have to enable port forwarding for your router
Port Forwarding
The thing is that your router has a unique IP address yet many devices connect to it so they all share the same IP. The router with port forwarding links a specific device to a specific port so that you can access your computer from http://ROUTERIPADDRESS:DEVICEPORT from the outside world.
I have the below the setup.
1)Desktop with windows 8 64bit os & Iam using net gear router connected to my desktop via Ethernet cable.
2)Currently iam using public ip or static ip(ex:123.45.67.890)from my isp.
3)Installed virtual box
4)Installed oracle linux 6.5 in virtual box
5)Installed oracle ebs.in virtual box
6)Virtual box network mode:bridge
7)My netgear router ip range 10.0.0.1 to 10.0.0.20
8)Assigned static ip in oracle ebs(10.0.0.30) with port 8000.
(note:the given ip is not in my router ip range)
9)Added host details(10.0.0.30 ebs.example.com) in my windows system32-->drivers-->etc folder-->host file.
Iam able to access url(http://ebs.example.com:8000) and I can ping ip of oracle ebs(10.0.0.30) from windows 8.and everything is fine.
My requirement is
10)I want to access the same url http://ebs.example.com:8000 from outside of my network.(eg:outside of my city or town).
(Note:I already tried by portforwarding 10.0.0.30 with port 8000 in my router but there is no luck)
Please can anybody help me on this request.
Virtualbox network interface in bridge mode is transparent to the router. It creates the virtual adapter in software mode and uses injection on your VB host network adapter to have the job done. It means that the router will see your VM as it does for any other computer, like if your VM were directly connected to the router. At this point you should assign a IP on the VM that's on under router IP range to avoid routing/permission/port translation problems.
Sure you will need port forward on the router but for testing purposes try to set the VM IP as DMZ on the router. With this setting all requests from outside world on any port will be redirected to the DMZ machine. If it works you can go more restrictive and forward just the needed ports.
Many ISPS blocks common server ports, like 8080. You must make sure you're using a port not blocked by the ISP. For this try setting up a service on a not common port (like HTTP on port 49010 or whatever port not listed by common services), and test it. If it works change the service to the desired port (8080), if it stops working it probably means that ISP is blocking port 8080.
You will not be able to access your VM from internet using such address like http://ebs.example.com:8000 or any other FQN in a simple manner as it does need DNS translation. Its possible doing so but you will need to buy and register some FQN and then find some service that offer DNS over Dynamic IP. Not sure what you mean by public or static IP because a static IP can be also public. In case you have a static IP you will not need specific services for dynamic IP but just the usual structure: Buy a domain name, buy or use own registar DNS servers to have a working FQN pointing to your IP.
Another approach is using a non FQN redirection service commonly used for dynamic IPs but that will work on static IPs also like DYN DNS, No-ip or any other.
With a static IP you dont even need some FQN. You can just use your IP directly like 123.45.67.890:8080 when need connection from internet.
I configured IIS in my windows 7, and when I enter 'http://localhost' in address bar; I can see my web site. Now, when I want to see my web site by entering internet IP address in address bar, I connect to the ADSL modem (it opens the page which we use to configure the modem!).
It seems that because the modem connects to the internet an gets the IP, not the PC, so the internet IP connects me to the modem. So, I think, I must change some settings of my modem.
I use a D-Link modem.
How can I fix that?
Thanks in advance
Unless you have a "server" or "business" configuration from your ISP which provides you a full subnet of public IP addresses, you've been allocated a single external IP address and the router attached to it does Network Address Translation for all the devices connected behind it. You can confirm this by using ipconfig or Windows Settings (ifconfig on Unix-like machines) to get your IP address. If using NAT, it will start with "10.", "172.16." through "172.31.", or "192.168.". These are "private" addresses and cannot be reached through the public internet.
For someone on the public internet to reach your computer, you need to set up Port Forwarding that redirects incoming traffic on your public, external IP to that port to a machine on the private network. The configuration pages for your router will have this configuration somewhere.
Note that if your router's configuration page is running on port #80 and you really want outside viewers to connect to you without giving an explicit port number, you will probably need to turn off or restrict modem configuration, move it to a another port, or go SSL only (port 443) so as to not cause a conflict with the port you're forwarding.
D-Link is a very common brand of router and there are pages dedicated to configuring port forwarding on them.
Also, just to complicate things, you almost certainly haven't been given a Static IP Address (they are usually quite expensive) which means that your external IP address will change from time to time (perhaps yearly, perhaps daily) making it difficult to tell others how to connect to your page. Your router configuration likely has support for Dynamic DNS (some free, some paid) where the router automatically updates the DNS entry whenever your public IP address changes.