Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


jakebriggs

16 posts

Geek


#315845 21-Aug-2024 23:40
Send private message

Hi all

 

A tiny bit of background, I've been running a tp-link with openwrt for way way longer than is advisable - and it started failing, so I dug out the router Vodafone/OneNZ gave me (a HG659 Vodefone Home Gateway) when I signed up to fibre a couple years ago, and set that up.

 

 

 

Now, I have a static IP, and a domain name pointing to various IPs. Lets say its example.com pointing to a website on a VPS in the state, and home.example.com pointing to the static IP I have from vodafone/OneNZ.

 

I have set up a port forward from port 80 on my HG659 to a port 80 on a computer computer on my lan behind the gateway. So far so good,

 

If I am outside my network (say, on my android phone with wifi off but on the cellular data network) everything works great - home.example.com resolves to the correct ip, and I can connect to the service on port 80 from behind the firewall.

 

 

 

The problem comes when I am inside the network, on the lan. home.example.com resolves to the correct ip, but, tryign to connect to that service does not connect, The router is not allowing connections from inside the network to "loop back" I guess.

 

Its been so long since I set this up I can't really remember the names of various settings. I have gained Admin access to the HG659 Vodefone Home Gateway and I can see I can add a static route but I am not sure thats what I need.

 

This is quite inconvenient, as I have multiple services - not just one on port 80. I have icecast, I have subsonic, and couple more things and I'd like to be able to connect to home.example.com:80 et al from inside and outside my network, and some of the software I use will treat them as different servers if I connect to home.example.com AND 192.168.0.2

 

 

 

Any ideas on how I might convince this router to play ball? Or am I going to have to by a new router for openwrt or maybe one of those fancy pants microtiks

 

 

 

Also, I think i read somewhere the OneNZ gives out ipv6 blocks? Is that true? That might solve this issue for me.

 

 

 

Jake


Filter this topic showing only the reply marked as answer View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
Spyware
3817 posts

Uber Geek
+1 received by user: 1366

Lifetime subscriber

  #3274300 22-Aug-2024 06:31
Send private message

Setup a DNS server on your network to point to internal private address(es). Otherwise bin the Huawei and buy a Mikrotik.





Spark Max Fibre using Mikrotik CCR1009-8G-1S-1S+, CRS125-24G-1S, Unifi UAP, U6-Pro, UAP-AC-M-Pro, Apple TV 4K (2022), Apple TV 4K (2017), iPad Air 1st gen, iPad Air 4th gen, iPhone 13, SkyNZ3151 (the white box). If it doesn't move then it's data cabled.




freitasm
BDFL - Memuneh
80646 posts

Uber Geek
+1 received by user: 41024

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #3274319 22-Aug-2024 07:59
Send private message

Replace that port forward with Cloudflare Tunnel. More secure and no problem with internal resolution.





Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


cddt
1964 posts

Uber Geek
+1 received by user: 1903


  #3274320 22-Aug-2024 08:00
Send private message

I ran into this a couple of years ago, the HG659 does not support NAT loopback. Two options: 1) new router; 2) run DNS inside your network (e.g. dnsmasq). 





My referral links: BigPipeMercury




jakebriggs

16 posts

Geek


  #3274329 22-Aug-2024 08:45
Send private message

Thanks all, much appreciated. I don't really want to set up an internal dns for this, as it'll only work for one machine.... But if it gets annoying enough, maybe I will.

 

Looks like a Mikrotik is in my future!

 

 


bagheera
544 posts

Ultimate Geek
+1 received by user: 189


  #3274330 22-Aug-2024 08:52
Send private message

if it is just one machine, and it is an os that lets you have host files (ie windows, linux & macos are some that will let you) then just add to the host file the internal IP address and DNS name - done.


jakebriggs

16 posts

Geek


  #3274331 22-Aug-2024 08:52
Send private message

freitasm: Replace that port forward with Cloudflare Tunnel. More secure and no problem with internal resolution.

 

 

 

absolutely not lol


HP

 
 
 
 

Shop now for HP laptops and other devices (affiliate link).
jakebriggs

16 posts

Geek


  #3274332 22-Aug-2024 08:53
Send private message

bagheera:

 

if it is just one machine, and it is an os that lets you have host files (ie windows, linux & macos are some that will let you) then just add to the host file the internal IP address and DNS name - done.

 

 

 

 

The machines wanting to connect are varied, but mainly my phone which changes networks regularly. 


michaelmurfy
meow
13579 posts

Uber Geek
+1 received by user: 10910

Moderator
ID Verified
Trusted
Lifetime subscriber

  #3274335 22-Aug-2024 08:58
Send private message

@jakebriggs Geez... You've been running this setup for -way too long- ;)

 

NextDNS could be an idea for you if you don't want to self host DNS as you can set your own rewrites in it too that'll just take effect for your local stuff. Aff link because why not but give it a try: https://nextdns.io/?from=4f6vmry3

 

Also, as Mauricio says Cloudflare Zero Trust Tunnel is excellent too. Run the agent on your home server and from there you can just put everything behind Cloudflare thus locking things down a bit tighter. This is free.





Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)

Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.


cddt
1964 posts

Uber Geek
+1 received by user: 1903


  #3274339 22-Aug-2024 09:14
Send private message

jakebriggs:

 

Thanks all, much appreciated. I don't really want to set up an internal dns for this, as it'll only work for one machine.... But if it gets annoying enough, maybe I will.

 

 

Not quite sure you interpreted the DNS suggestion correctly. You configure dnsmasq (or similar) on one of your devices (can be one that is already serving other content or applications), then tell your router to point all DNS requests at the internal machine with dnsmasq. So all your devices will use the internally correct DNS... 





My referral links: BigPipeMercury


jakebriggs

16 posts

Geek


  #3274340 22-Aug-2024 09:16
Send private message

michaelmurfy:

 

@jakebriggs Geez... You've been running this setup for -way too long- ;)

 

 

yeah but it was flexible and it worked and I had a kid 7 years ago and I had no time for computer janitoring lol

 

michaelmurfy:

 

NextDNS could be an idea for you if you don't want to self host DNS as you can set your own rewrites in it too that'll just take effect for your local stuff. Aff link because why not but give it a try: https://nextdns.io/?from=4f6vmry3

 

Also, as Mauricio says Cloudflare Zero Trust Tunnel is excellent too. Run the agent on your home server and from there you can just put everything behind Cloudflare thus locking things down a bit tighter. This is free.

 

 

Yeah I don't want some extra bit of software to maintain that's closed source and maybe support for my OS will evaporate and doesn't live in the repos meaning I have to get it from elsewhere and update it by hand. 

 

 


jakebriggs

16 posts

Geek


  #3274343 22-Aug-2024 09:18
Send private message

cddt:

 

jakebriggs:

 

Thanks all, much appreciated. I don't really want to set up an internal dns for this, as it'll only work for one machine.... But if it gets annoying enough, maybe I will.

 

 

Not quite sure you interpreted the DNS suggestion correctly. You configure dnsmasq (or similar) on one of your devices (can be one that is already serving other content or applications), then tell your router to point all DNS requests at the internal machine with dnsmasq. So all your devices will use the internally correct DNS... 

 

 

 

 

No, I absolutely interpreted it correctly. If I have two servers internally, both serving something I want to access from the outside world, then DNS will not help me as I can only route requests from home.example.com to one IP regardless of port


 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Free setup code: R587125ERQ6VE. Note that to use Quic Broadband you must be comfortable with configuring your own router.
michaelmurfy
meow
13579 posts

Uber Geek
+1 received by user: 10910

Moderator
ID Verified
Trusted
Lifetime subscriber

  #3274345 22-Aug-2024 09:25
Send private message

jakebriggs: Yeah I don't want some extra bit of software to maintain that's closed source and maybe support for my OS will evaporate and doesn't live in the repos meaning I have to get it from elsewhere and update it by hand.

 

Yeah think in this case NextDNS will be perfect for you. It's a Cloud DNS provider so nothing to maintain as you just update the DNS on your router and it's done. I've been using it for years now. This enables you to then have both internal (home network) and external DNS zones.

 

You can also do this with the Mikrotik however I'd do DNS over SNAT hairpinning as DNS is just simpler. This is how I personally do it on my network.





Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)

Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.


RunningMan
9184 posts

Uber Geek
+1 received by user: 4833


  #3274346 22-Aug-2024 09:29
Send private message

jakebriggs:

 

freitasm: Replace that port forward with Cloudflare Tunnel. More secure and no problem with internal resolution.

 

 

 

absolutely not lol

 

 

?


jakebriggs

16 posts

Geek


  #3274347 22-Aug-2024 09:32
Send private message

michaelmurfy:

 

jakebriggs: Yeah I don't want some extra bit of software to maintain that's closed source and maybe support for my OS will evaporate and doesn't live in the repos meaning I have to get it from elsewhere and update it by hand.

 

Yeah think in this case NextDNS will be perfect for you. It's a Cloud DNS provider so nothing to maintain as you just update the DNS on your router and it's done. I've been using it for years now. This enables you to then have both internal (home network) and external DNS zones.

 

You can also do this with the Mikrotik however I'd do DNS over SNAT hairpinning as DNS is just simpler. This is how I personally do it on my network.

 

 

 

 

eh I'd rather have it contained locally 


RunningMan
9184 posts

Uber Geek
+1 received by user: 4833


  #3274350 22-Aug-2024 09:36
Send private message

jakebriggs: eh I'd rather have it contained locally

 

jakebriggs:Thanks all, much appreciated. I don't really want to set up an internal dns for this, as it'll only work for one machine.... But if it gets annoying enough, maybe I will.

 

If you want it local then you're going to have to set up something internal running DNS. Be it replacing the router with something capable or a seperate DNS instance on an existing or new piece fo hardware.


 1 | 2
Filter this topic showing only the reply marked as answer View this topic in a long page with up to 500 replies per page Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.