hello I created a website with IIS. I open ports and everything. I can access this website from another network with ip and port
like http://81.215.xx.xx:81 . but with any computer with same network (LAN) I cant access http://81.215.xx.xx:81 like this. I can only access when I write the static ip of that machine. like http://192.168.1.3:81/
I want to access with external ip in lan how can I do that?
Your LAN most likely has another equipment, a router for example which has an interface with the other IP address, http://81.215.xx.xx:81. Your router forwards requests to your server based on its routing table. This routing does not exist when you are in the private network. That is why you can only access the server with its private IP address which is in the same range as your computer when you are in that network.
Related
I am struggeling to connect to my home server that is connected via a Fritzbox router to the internet. I want to connect to the home server from outside of the home net, as it serves as a NAS and provides HTTP(S) services.
The problem is, that I don't understand how to connect to the server over the internet. My Fritzbox is connected to my internet provider via DS-Lite internet connection. As far as I understood, this means that my Fritzbox has no public IPv4 address and therefore the server is not reachable.
Is it still somehow possible to connect to the server?
Reading your question, I can see that there are multiple steps to solve this.
figure out if your internet provider allows you to have incoming connections
I do not know, what a ds lite connection is. Depending on your connection type, e.g. glass fibre, dsl, mobile and your provider incoming connections might be allowed or not. Also specific ports might be forbidden.
Enable port forwarding for incoming connections to your lan server.
Your fritzbox does not know, where to route the incoming connection to.
Make your lan server ip address static. Go to your fritzbox admin page and create a port forwarding rule and map data incoming on port 80(HTTP) and 443(HTTPS) to the lan server ip address.
You can read further here: https://en.wikipedia.org/wiki/Port_forwarding
Figure out the fritzbox's public ip address by checking out this website from within your lan. https://whatismyipaddress.com/
Connect to your server via http(s)://publicip
setup dynamic dns to have a public domain, which you can use instead of the ip address.
Usually private customer internet connections use dynamic ip addresses. So your ip address changes regularly. This is annoying, because you need to lookup the ip address before you can connect again. To avoid this issue, you can use a dynamic dns provider to give you a domain name, which you can use instead of the public ip address. Your fritzbox should have this kind of functionality already. If not, you can also configure it on your server with a cron job.
You can read further here: https://en.wikipedia.org/wiki/Dynamic_DNS
This provider is easy to use and for free: https://freedns.afraid.org/
use the dynamic dns domain name instead othe public to access your server from anywhere
Be aware, that having open connections to your local network gives attack surface from the public internet. So people might steal or delete data on your server or abuse it in other ways.
I'm working on a project which enables a web-based server which is accessible through 127.0.0.1:8081.
But I am not really able to understand the concept of the ip address. Does it mean the address is only available from the device which opens up the server, or across the whole LAN on any computer connected to that same router?
127.0.0.1 is a special IP address that refers to your local machine. Localhost resolves to this address. If you want to make your server accessible from the web or a different machine you will have to use a routable IP address.
I have a machine in my private network with IP 192.168.1.10
I have a DNS name, "toto.mydns.com", a DNS client is running on the machine.
I configured the router for Port forwarding.
I can access the machine when i am outside my home, when using a pulic IP address it works but when i am at home and i get a dynamic IP address trough DHCP from my router, i cannot use toto.mydns.com anymore, i must use 192.168.1.10 to access.
I would like to know if i need to configure something on the router for that ?
Thank you !
toto.mydns.com will resolve to your external public IP
There will almost certainly be nothing routing that IP through to your router, and thus through NAT to your internal address.
The easiest way to resolve this (Pun very much intended) is to have a hosts file entry on your computers running inside your network so that they resolve the same DNS address to the internal address.
A much harder, but more fun, way would be to set up your own DNS server inside your network, have the DHCP dish it out as the primary DNS server for your network and put in an entry for your internal address :D
Have fun...
Toto.mydns.com is accessible from outside,this DNS is assigned on a machine with a static IP address(sorry not dynamic),so the IP of this machine is 192.168.1.10.
Whrn i am at home in my private network i need to enter 192.168.1.10 and toto.mydns.com does not work.Any help???
I've some doubts about a VPN.
I've been given a Cisco VPN client to connect to the LAN of my society. I use this to connect to a local server. I don't understand how the VPN is working.
I'm at home now. In the VPN Client I see an IP. If I go to http://www.whatismyip.com/ I see another IP, which is the IP I've when I'm also without the VPN Client, while I expected to see the IP of the VPN Client. If I use $_SERVER['REMOTE_ADDR'] I see another (third!) IP, while I expected the IP I see in the VPN Client.
Can you clarify please?
I need this to know if I'm identifies always from the same IP from the local server.
If I'm not mistaken, this should be correct. Please correct me if I'm wrong.
By default you have 2 IP addresses.
Local IP: IP address used to identify yourself within your LAN.
Global IP: A public IP used to gain access to the internet. At home it will most likley be a public IP NATTED* by your ISP.
Because you're also using a VPN connection, you'll receive a third IP.
Local IP for VPN: IP address used to identify yourself on the other end of the VPN.
*NAT = Network Address Translation
I'm having a static IP address, say:127.254.x.x
Is it possible to access my web application from some other place by just replacing the local host with my IP???
Also, what will I replace the local host with if Ithe server is on a wifi network.? I.e. The router assigns a different ip to my server(because of dhcp) other than my original static ip. In this case should it be
192.x.x.2:8090
Or
127.254.x.x
Any help is appreciated.
I'm having a static IP address, say:127.254.x.x Is it possible to access my web application from some other place by just replacing the local host with my IP???
Yes, provided you configure it correctly.
Normally, you have a broadband modem/router which talks to the outside world, and provides a NAT network range to your devices. So you have an external IP address (the one the modem/router uses to talk to the outside world), and probably several internal IP addresses (for your phone, your laptop, your other laptop, your Kindle, etc.).
So to access a web server on your internal network from the outside world, you have to do two things:
Configure your modem/router to "forward" traffic it receives on the desired port (port 80 for HTTP) to the server on your network. How you do this depends on your modem/router. Look for "port forwarding."
When trying to access the app from the outside world, use your external, not internal, IP address.
So for instance, if your external IP address is 222.111.222.12, and the IP address of the machine you're using as your web server is 127.154.0.23, then you tell your modem/router that whatever traffic it receives on port 80 it should forward to 127.154.0.23 (this configuration may be by IP address, or may be by the MAC address of the network card in your web server machine; it depends on the modem/router). Then to view your app from outside your network, you go to http://222.111.222.12 (or whatever name you assign that IP address to in DNS).