Noob question. Would that request travel over the internet or is it resolved locally?

If the router supports hairpinning, the IP request can be resolved locally.

The domain name lookup would be a different issue and could potentially need to be resolved externally, but the router’s DNS cache should be able to answer eventually.

Illecors
link
fedilink
English
121Y

Depends. If the zone responsible for whatever resolves to that IP is hosted locally - then DNS request would stay local.

If the service behind that IP is running locally - then all traffic would stay local. Network stack would be smart enough to not run circles to find itself.

Natanael
link
fedilink
21Y

Yeah, the router ought to know that public IP belongs to a device in its own network unless you’re doing stuff like running your own router behind an ISP provided router and just forwarding ports instead of maintaining IP assignment / routing tables

I think OP is referring to NAT hairpinning though.

Tell that to my opnsense box that refuses to NAT mirror.

That’s a WAN IP, so it would be resolved by external DNS then routed back

Why are you mentioning dns? This is an ip request, no need to contact a dns server

macniel
link
fedilink
21Y

Yeah no need for DNS but an ARP lookup would be in order.

Because the title mentions having a domain, I guess.

@ArtVandelay@lemmy.world
link
fedilink
English
3
edit-2
1Y

Yes, that was the train of thought I was on. I equated “find” to “resolve” and I’ve been dutifully chastised.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 38 users / day
  • 138 users / week
  • 529 users / month
  • 2.24K users / 6 months
  • 1 subscriber
  • 1.68K Posts
  • 37.1K Comments
  • Modlog