Access My Windows 7 Server by External IP from Machine on Local Network - iis

I have setup a number services on my home network (two security system DVR's and IIS on my Windows 7 machine).
All of these devices are behind two routers and have static IP's. I have configured port forwarding on both routers so that everything is accessible via my public IP address. When querying my public IP address outside from a machine outside of my local networ, everything is 100% accessible and working as expected. However, when querying my public IP from a machine or device on my local network, the requests just timeout with nothing served. The only way I can access these resources from a machine on my local network is by querying them by their local IP address.
To explain more clearly (using example IP's):
My Windows 7 machine (which has IIS setup, accessible over port 80) has a local IP of 192.168.1.100
My first security system DVR has a local IP of 192.168.1.101 and is accessible over port 5000
My second security system DVR has a local IP of 192.168.1.102 and is accessible over port 5001
My public (static) IP address is 222.222.222.222
When I am outside of my local network and I open http://222.222.222.222/ in my browser, my Windows 7 IIS website appears in my browser. When I am outside of my local network and I open http://222.222.222.222:5000/ in my browser, my first security system appears in my browser. Lastly, when I am outside of my local network and I open http://222.222.222.222:5001/ in my browser, my second security system appears in my browser.
However, when I am on my local network, I am unable to load any of these devices using my external IP address. The requests just timeout with nothing loaded. When I am on my local network the only way I can get these to load in my browser is by browsing directly to their local IP addresses in my browser.
I'm guessing that I somehow need to either A: get my request for my public IP when on my local network be first sent outside my local network and then sent back to it through my public IP or B: somehow detect if the public IP address is being queried from a local IP and if so, serve up those resources via their local IP...however I don't know if either of those are correct, and even if they are, I don't know how I'd go about doing it.
Can anybody point me in the right direction? All the machines on my local network I'd like to access these resources from are Windows 7 machines, if that makes a difference.

Ideally, you could utilize NAT loopback if your router(s) supports it. NAT Loopback Wiki
If your routers don't support NAT loopback, you may have to go with option B (better than A). Assuming you only need this functionality from one PC, you could mess with the routing tables. That would get really messy in Windows, but possible. AND you would have to track your dynamically changing external IP address somehow. I'll leave options A and B at "improbable" but I'd love for the community to prove me wrong =)

Related

How to write a Node.js server if my pc's ip address changes daily

I am owning a Windows PC. I have written a Web application that runs fine. But the problem is my PC's IP changes periodically. I want that application to be accessible in the network (from other pc's) without changing client side code . My client side code is in angular js.
The web server of your web application cannot bind to the correct IP if it doesn't know it in advance.
You can make your IP address static by following these steps:
In Windows, go to the Network and Sharing center
In the left pane, choose "Change adapter settings"
Right click your ethernet or wifi connection (the one connected to your router) and choose Properties
Double click Internet Protocol Version 4 (TCP / IPv4)
As an IP address, choose the one your computer already has (or try another IP address starting with the first same 3 numbers, i.e. xxx.xxx.xxx.yyy)
The default gateway is the IP address of your router
The subnet mask is typically 255.255.255.0
For the DNS server choose Google's 8.8.8.8 and/or your router's IP address
You have several choices depending upon your configuration.
If this is the public dynamic IP you get from your ISP, you can go to your ISP (whoever you get internet service from) and upgrade your service to a static IP address so it won't change.
If this is the public dynamic IP you get from your ISP, you can use a dynamic DNS service to attach a hostname to your IP address and then use that hostname to access the server. The dynamic DDNS app you put on your server will keep the DNS updated whenever your dynamic IP address changes.
If this is just a local IP address on your LAN (a 192.x.x.x or 10.x.x.x address), then you can pick an IP address that your router supports, but is above the range being used for DHCP and set that computer to use that IP address and not DHCP. In Windows, you can go to the networking configuration and choose the IP address instead of using DHCP. Then, the IP address won't ever change. It is important that you pick an address outside the range used for DHCP to avoid any conflicts. On my own LAN where the router is allocating addresses like 192.168.0.x, I manually assign addresses like 192.168.1.250.
This is something that your router handles through a protocol known as DHCP. Basically, the answer is to keep your IP from changing.
Many routers allow you to reserve an IP for certain MAC addresses. I would recommend that you access your router over your local network and work with the GUI it provides to try to configure this... if you're successful, then your IP will no longer change, and problem solved :-) If it's not intuitive, then of course refer to the documentation for your router.

How to access virtual box web server url access from outside network

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.

How to connect to a computer not the modem using internet IP address?

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.

Browse Home Intranet by Machine Names

I have Apache2 running on one of my linux machines, and I often use it to browse a local website on that machine from other machines on my home network.
But I can only do so by accessing the server by IP address.
I would like to be able to access via hostname, or some other arbitrary, memorable string, but I can't figure out how to do this. My Netgear router has a section that lists MAC addresses, corresponding IP addresses (assigned by the router through DHCP) and a user-configurable device name. I thought this would map between the device name and IP address, but it doesn't; all attempts to load a webpage using the device name fail, although the page loads just fine if I provide the IP address directly.
How do I make this happen? I'm running Linux on the server machine.
Basically you will need to run a name server on a machine on your network and make it auth for your local domain. Then adjust your Dhcp server to give out that server as the DNS server. Or you coukd always modify your hosts file on your boxes to contain the name to ip mappings if you don't have a lot of hosts.

Troubles accessing the VirtualHost on a local net

Hi I have a Huawei ADSL modem with a dynamic IP. I set up a dynamic dns with freedns and I can easily access my Virtual host on apache from outside my private network, from internet.
So trying to access it from a local network I get a modems login page.
I have the rule in my modems NAT to connect port 80 to my server but it seems it doesnt work from internal net.
My server hosting the virtual host is 192.168.0.1 , the modem has the 192.168.0.254 address.
I tried to put my external domain name into the /etc/hosts file, but if I do that then asterisk server gets confused.
What could be the cause of the problem ? And what would be the best solution to this problem ?
Should I set up a caching DNS on the private side of the net ?
Hugger is half right... Its because your router is blocking loopbacks. The easiest way around this is to edit the hosts file (See the Wiki page) on the computer that is behind the network to see the local IP of the computer as the virtual host your going for. For example if your server is on 192.168.0.1 and the virtual hostname is www.imrad.com then insert
192.168.0.1 www.imrad.com
into your hosts file. If your computer leaves the local network (like a laptop you take to work) and joins a network not behind your router you need to comment out the line in the hosts file.
well actually to access that you must find the local ip address of the server by going into command line/prompt and typing ipconfig /all then you will find ipv4 address. Take note of that.
Go to another computer and your that ip and it will show.
The reason that was happening is because the router/modem knows you are in its network so it will think you ar trying to go top the login page of it. That happens to me too.

Resources