Hey all, first time needed to post to configure something that up untill now didn't find a solution for.
Running OpenWrt 18.06.1 r7258-5eb055306f on linksys 1900acs for few years now.
I've switched this week my isp to get higher down/up speed. (moved from pppoe to dchp docsis3)
I have several services on my lan that i access with ddns from outside and inside the lan.
Up until now every thing worked (before switching isp) to access the url didn't need to configure anything but open ports (80/443)
after switching i can't access inside the network to the external ip with the ddns address.
I've tried several tricks like making sure the port forward has reflection flag on it.
Tried adding to /etc/hosts file the address (which i dont really like) which works at the beginning but some of the computers/tablets not getting it and i want a better solution then that.
I'm software enginner and have some knowlege around networks/openwrt configuration (but not so much).
what i'm trying to figure out, is there a configuration to fix it in openwrt that i'm missing or haven't configure right.
Maybe the problem is with the new ISP and there is no solution.
Hope you could inspire me with a solution it really fustrate me.
Have a great week.
NAT Loopback is not a good solution.
Just create a domain entry in dhcp configuration (or Network Hostnames in Luci) with the name that you use and the internal IP of the server.
can you elaborate on that?
i've went in luci to network-> hostnames
added the hostname and the machine's ip that should connect to it.
not seeing any change when in lan network (tried reconnect to network if that's neccesseray)
i also see in etc/config/dhcp the new record i've added
Not sure of your ISP, but many DOCSIS ISPs use carrier-grade NAT in their networks with IPv4-addresses on the router that are not publicly routed, so can not be reached from the outside. I would not be amazed if the DDNS service would collect the public IPv4 address from the CG-NAT device and just stop there...
What is the out put you get from:
Do an nslookup your.domain.name from the host in the lan and post here the output.
You seem to be behind CG-NAT by the way. DDNS and port forwarding won't work. Is your wan IP public or private?
I'm a bit confused about what you said about CG-NAT, not sure exactly what it is but:
when i'm outside the network i'm able to access my server (the ports i've opened are working, the ip i get from the modem is the external ip in the www net)
The first two addresses are not publicly routed addresses:
computer:~ user$ whois 10.175.128.1
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
inetnum: 10.0.0.0 - 10.255.255.255
organisation: IANA - Private Use
status: RESERVED
remarks: Reserved for Private-Use Networks [RFC1918].Complete
remarks: registration details for 10.0.0.0/8 are found
remarks: iniana-ipv4-special-registry.
changed: 1995-06
source: IANA
computer:~ user$ whois 172.18.8.30
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
inetnum: 172.16.0.0 - 172.31.255.255
organisation: IANA
status: assigned
remarks: http://www.iana.org/go/rfc1918
changed: 1994-03
source: IANA
That IMHO is a decent hallmark of your ISP using some sort of NAT. What IP-address does the ddns service return? My prediction is, if it just queries the router it will get something close to 10.172.128.1 which will not be reachable from the outside, and when it queries from the outside somehow, you might get the CG-NAT devices public IP-address. In any case DDNS is not going to result in a working solution. Either use IPv6, or ask your ISP for a publicly routed IPv4 address (and/or dual stack, with both publicly routed IPv4 and IPv6 prefixes).
P.S.: You can just copy and paste the content of a terminal window as text, no need for taking image screen grabs, just paste the text between two lines og three back-ticks each (without the quotes), like:
"" YOUR PASTED TEXT ""
Example:
Can you show me what entry you have for the host? uci export network; uci export dhcp; ls -l /etc/resolv.* /tmp/resolv.*; head -n -0 /etc/resolv.* /tmp/resolv.*
If you are able to connect from outside then this is not the case.
Using private IPs on some routers doesn't necessarily mean there is CG-NAT. The way to be certain is to check the wan IP.
Mmmh, 84.108.0.0/16 belongs to your ISP and is publicly visible, so that could be true dynamic IPv4 addresses or the CG-NAT front of your ISP, but traditionally with cg-nat you can not reach your machine from the outside, so the fact that you can access your computers from the outside argues against CG-NAT being your immediate problem.
the modem from the ISP in bridge mode, i'm using my private router for everything else.
and yes i'm able to access my services outside the LAN with the ddns address, the problem is that inside i can't and i was able to before i switched ISP's, from what i've told the modem i've got now (which i must use and can't switch, because it's propaitary docsis) can't handle hairpinning/ NAT loopback (just saying the terms, not sure i fully understand it)
i would like to understand what are my options so when i'm inside the network i'll be able to access with the same address as from outside the LAN
I believe that that actually is a router thing, a bridged modem should not affect that at all.
That looks like you are trying to re-define your external dns.name with a local address manually. I was under the impression that hairpinning will do that automatically for your, so maybe this re-definition is interfering?
I hope that you have restarted the service to apply the change in the name. service dnsmasq restart
If that is not the case, make sure that the host you are using is not bypassing the nameserver of OpenWrt and uses your ISP or some GoogleDNS.
okey i think i narrowed down the problem to 2 areas.
i pinged the ddns inside the router ssh, before i made any change i got the external ip address.
changed the hostsnames page so the machine's ip has the ddns address.
after few restarts i got from ping the internal ip.
but when i revert the change and do several restarts it doesn't come back to the external ip..
i'm not sure if it's persistent, if i wait, close the terminal and test again it sometimes comes back.
i would like to know what makes the change, so when i ping the ddns address i get the external or the internal ip...