Cannot access machine via DNS in the private network - networking

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???

Related

My Router Internet IP is different from my public IP

I am running a ddns client on Ubuntu for Nextcloud server, however my ISP has done something to the router so internet IP showing in the router is different from my public IP which causes an issue when ddclient updates the IP of my domain.
I have tried to contact my ISP but they want me to pay a huge amount for a fixed IP.
Is there any solution for this?
My router model is HG8245Q2.
*PS: The IP shown in the image is just an example.
Note: I tried this on a another router model HG8245Q, and it gives me the same IP on both router and google. so no issue on the old router model.
The IP address you see in your router is just another internal IP address from private range 10.x.x.x
This means your router is not connected directly to the internet but to another subnet of your ISP. And only this subnet is connected to the internet over another router (with NAT) and this router has a public IP address.
This is standard behavior with most of ISP because they have limited count of public IP addresses. If you need public IP, you have to pay for it, change ISP who gives you one for free or try some edge case solution like rent VPS server and make VPN tunnel to your home router (this requires advanced networking skills)
Maybe DDNS comes in handy for you. You can opt for free DDNS services like DynDDNS or NoIP.
Steps [I personally prefer noip.com ]:
Create a Free Account
Choose a hostname(We can say a domain name pointing towards ur system IP)
Download their desktop client(To sync your Dynamic IP with the hostname you selected)
Boom it's done! Use that hostname instead of IP wherever needed, traffic will be redirected to your system. Just take care of port forwarding and firewall settings.

cant access iss with external ip in lan

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.

Failing to manage a Public Ip

Here is the scenario:
I have asked my ISP to give me public IP, which I can connect to my laptop and access from other outside network. They gave me following
IP : 103.51.2.198
subnet mask : 255.255.255.248
default Gateway : 103.51.2.193
preferred dns : 8.8.8.8
Alternate dns : 8.8.4.4
I have connected PPPoE connection in my laptop (not in router) and set these values at TCP/IP V4. My internet connection is fine.
But If I ping from other network by this IP (103.51.2.198), request is timed out.
Than I checked whatsmyrealip. and the IP is (103.51.2.102). this IP is a public IP of my ISP provider. And they are trying to give me an IP from that IP.
My ISP providers are not expert in networking nor am I. They are also not sure how they can give me a public IP.
I am not sure about what are they trying to do. and how will they give me another IP from a public IP. It will be very helpful, If anyone can explain the problem. and give a solution.
First of all, it's called public IP not "realIP".
Anyways, the answer for your question is:
You cannot access your home computer because it is behind NAT so it is unreachable from the outside of your network.
Quick example on how NAT works:
Scenario:
Private IP: 192.168.0.10
Public IP: 1.2.3.4
You are connecting to webserver on IP: 5.5.5.5
What happens:
You send data to your router, telling it that you want something from
5.5.5.5, your router assigns you a random port, let's say 11111,
sends the data with source IP 1.2.3.4 and port 11111. Stuff
happens on the webserver and the data comes back. Router reads it and
remembers that everything going to 1.2.3.4:11111 belongs to
192.168.0.10 so it sends you the data.
Here everything works because it's your computer the one starting the connection, otherwise, the webserver would never be able to connect to you.

How to know Router's IP what connect to Modem

I have a network like that:
Internet <-> Modem <-> Router (broadcast wifi)
I'm using Windows. If I use command: ipconfig, I only know Modem's IP through info of Default Gateway.
So, how to know the Router's IP in this network.
Thanks.
If you want to know the external (from the Internet IP) you can browse to http://www.whatismyip.com/ and check it there.
Or
You can check it inside the router's configuration page. Unfortunately you can't simply know it by being a member of its network since this is a limitation of the NAT and the IP protocol.
If you wish to know the router's IP inside the internal network of the router .
when running ipconfig it should be the Default Gateway entry.
If you know your IP and you know your Netmask, then you can easy find out the subnet. The Router's IP is "always" the first avaible IP in the subnet. Thats the case for your private IP.
For the public IP you can try a service like this one.

Cisco VPN IP address

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

Resources