Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

public ip from the inside

May 3, 2017 10:25AM PDT

hi my question is quite easy but unfortunately i can't find a solution for that. I have a couple of server in my LAN and i port mapped the router (Vodafone Station) to access the servers from the outside... Now my problem is that when i am outside i can access the server through the ip address xx.xx.xx.xx:port and when i m inside the lan i can only access the servers through the local address 192.168.1.x. With my former router i was allowed to access my servers with the same public ip address even when i was under the Local network (writing down xx.xx.xx.xx:port) and now it's not possible anymore with this new router. I guess there should be some setting or rule to set up in the router. It's quite a big problem for me, because i have some App on the phone and Bookmark to point at my server and this way i need to have double version of those - 1 when i am out of home, - 2 when i m inside my LAN.

could you help? thank you

Discussion is locked

- Collapse -
Answer
Not all routers do this, but...
May 3, 2017 1:24PM PDT

You can use the HOSTS file to enter a name for this server such as serverout and serverin to make it easy to type in. I did that in a case like yours.

As to the bookmark, make two, one if by LAN and two if by sea. (you get the idea.)

- Collapse -
first, thank you
May 3, 2017 1:56PM PDT

well the bookmarks technique is not the best for me.

the part of "HOSTS" i apologize but i have no idea what you mean Happy sorry
where should i put that HOSTS file? and what's the syntax? thanks again

- Collapse -
As a networker, one of the tools we use is
May 3, 2017 2:14PM PDT

Google research. There are fine tutorials when we want to use the HOSTS file. This won't apply to say a smart phone.

The bookmark fix looks great to me. In fact, a little too easy?

- Collapse -
the bookmarks fix
May 3, 2017 2:17PM PDT

it's not really user friendly because for example my mother... she doesnt know when she is inside or outside the LAN... so if she wants to open the garage or watch the webcamera... she needs just 1 bookmark. see what i mean?

- Collapse -
about the HOSTS file...
May 3, 2017 2:19PM PDT

is that inside the router or the computer?
my problem is that all my family access the server from mobile devices

- Collapse -
Sorry
May 4, 2017 7:42AM PDT

But I will bow out here. The hosts file is easy to learn about on the web so I'll leave you to see what others can offer.

Maybe you need to demand the router maker fix this one.

- Collapse -
well
May 4, 2017 7:49AM PDT

as far as i know
the hosts file is inside the computer...

the issue i am having is between my clients (mobile phones) and the router -> to take mobile phones to the server (which is a Raspberry), i guess it's not a problem of hosts file as long as the router (vodafone station) doesn't have one

- Collapse -
Why I think it's up to the router maker
May 4, 2017 8:13AM PDT

Is this router doesn't do the trick the old one did and you don't accept the workarounds.

I feel the workarounds are fine. I've used that method for far too long so for me, it's acceptable.

- Collapse -
the router maker is my provider
May 4, 2017 8:17AM PDT

and it's a quite closed project.

probably i should work with dns...
i mean: if i set up a dns server inside my lan
then i can try to route each request to the public ip to go to the local ip address where the server is.
then i should set up mobile phones to work with that local dns server.

what you think about it?

- Collapse -
That's one way to work this.
May 4, 2017 8:21AM PDT

Seems a lot less work to use my old methods. But your time and choice.

- Collapse -
Forgot a thing.
May 4, 2017 8:24AM PDT

The DNS works by taking a name and giving it an IP address so if you use a custom DNS and then you put that into say a phone, then move outside the LAN you'll also have to code a DNS shim app to change from local DNS to your mobile DNS. Sounds like a lot of work to avoid a second link.

Not only that but let's say you are using an IP address to get to the server. The DNS is not consulted at all.

- Collapse -
And FORGOT a BIG thing.
May 4, 2017 8:27AM PDT

Many ISP routers are modem and routers that can be changed to be a modem only which we install our own router. That is another exit.

- Collapse -
well
May 4, 2017 9:02AM PDT

that's not allowed here

- Collapse -
Is there more story here?
May 4, 2017 9:41AM PDT

I always take it that when folk write about a problem like this they are the admin and there is no restrictions on what it takes to fix it.

i.e. They are God.

- Collapse -
i m sorry
May 4, 2017 11:28AM PDT

i don't think i understand your point

- Collapse -
As simple as I can make it.
May 4, 2017 12:16PM PDT

You are running a server so that's fairly advanced so it should be trivial to use more than one link. Also, you would be the God of the network to make it work in the first place.

If there are artificial limitations or users that can't try the other link, I can't do much for you.