SOLVED:Web access not working from wan

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

SOLVED:Web access not working from wan

Post by djlevi »

Hi.
I have a problem when accesing web manager from WAN. We have apparently right configured all ports and services in our router and in our QNAP.
We are getting a redirection in navigation bar that never completes: http://xxxxxxxxx.com:8080/redirect.html ... 0347007155
Trying to connect to https whe don´t even have this redirection info, simply is not working.
The problem gets more strange as long as a few users tells that they can connect form their internet home connection.
I just try redirecting the ports to another little qnap we have and is accesible with no problems.
So the problem seems to be located on the main QNAP.
The thing is that QNAP technical support dont want to help because they said they can access our qnap without problem.
I tried from several internet access outside the office and from windows, mac, firefox, chrome, explorer, safari ...
I can only acess the qnap from myqnapcloud portal way.
Any help is very appreciated.
Thanks.
Last edited by djlevi on Thu Apr 27, 2017 8:20 am, edited 1 time in total.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Web access not working from wan

Post by schumaku »

Hi,

Lack of any useful information, ... suspect one or multiple configuration issues on your big/production NAS - something must be different from the small one:
- invalid or incompatible port trunking configuration,
- non-consistent network configuration, ie non-matching subnet masks,
- multiple interfaces connected into the same LAN TCP/IP subnet,
- NAS VPN pool network range overlapping/matching the LAN subnetwork,
- ...or something very odd configured on a security appliance/router, ie. policy routers or the like.

Of course, on one public IP, one port number can be NATed to one LAN IP address only.

-Kurt.
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Hi Kurt.
Thanks for your help, it´s quite better than i had from qnap technical suport.
I now a little about networks and i checked a lot of times all that you point (subnet masks, vpn, web server config, etc)
I have compared the config on both NAS an is the same (not maching ips obviously)
I also know that only one ip can be nated on one port, that is not the problem.
I think that could be related with apache config, but i have no information at all on how web server works on qnap.
I had in the past one web server configured (ajaxplorer) but after a while nobody was using it and i ddisabled it. Also it seems that after any upgrade the web admin access stoped working. Those are the only clues i have to make any sense of what happened.
The most strage thing is that one user can connect from his home and, everytime i create a ticket for support, they tell me that the cannot help me because the can connect to my NAS propery. I tried from almost 5 different internet acces and cannot connect in annyway, neither http nor https. I also though about subnet ip ranges but i tried from different LAN configs. And another strange thing is that i can connect from myqnapcloud portal indirectly.
I´m sure that if i had a little more info form qnap tech i could solve by myself. Its a webredirection issue quite clear for my, as long as http://xxxxxxxxx.com:8080/redirect.html ... 0347007155 is shown in browser bt i cannot analize the code in wed admin html/php because is too complex for me.
One last thing i can say is that i can connect to VPN which server resides in that NAS without any problem, so it seems not to be a network related problem as all people make me believe (mabe really i am wrong).
Come on guys, accept the challenge and help me to solve it.
yunixx
New here
Posts: 2
Joined: Sun Aug 21, 2011 12:08 pm

Re: Web access not working from wan

Post by yunixx »

I have the same issue, which started in the last few days after upgrading to the latest FW (Model:TS-420 Current firmware version:4.2.1). It used to work with whatever earlier FW version was on it.

Access to the NAS from outside the home network (using a dyndns.org URL and router port forwarding to NAS) does not work. It gets redirected to myhostname.dyndns.org:8080/redirect.html?count=0.5247001173011911 - which ends up with "Unable to Connect" error on al browsers I have tried.

Access using a local 10.0.0.x address works fine - the redirect happens and eventually lands on http://10.0.0.x:8080/cgi-bin/

I have tried all options I could think of, with no luck.

Any help would be appreciated.
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Hi.
Some new clues. We have also 10.0.0.x ip in our nas lan. Maybe this could help.
Also i tried a thing that is mindblowing. I´m now in another external office, i cannot access to nas web management as usual. Then i connect my vpn to current office network. I know that it has no sense as long as i´m inside the office i´m connecting. Then i try to connect to the remote qnap which has the problem and it works.
I made a second test connecting to vpn network in my home and it also works connecting to qnap nas. But if i connect directly all i get is damm redirect message in browser address.
yunixx
New here
Posts: 2
Joined: Sun Aug 21, 2011 12:08 pm

Re: Web access not working from wan

Post by yunixx »

Just realized that I did not have 8080 port forwarded to NAS's 8080 port. I had just 80 forwarded. After that change in the router, it works as expected.

DUH!!
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Lucky you. I have both and is not working for me.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Web access not working from wan

Post by schumaku »

djlevi wrote:I had in the past one web server configured (ajaxplorer) but after a while nobody was using it and i ddisabled it.
Ajaxplorer does oprate on the NAS Web Server (default 80/TCP for http, 8081/TCP for https) - and doe snot interfere at all with the QTS access.
djlevi wrote:The most strage thing is that one user can connect from his home and, everytime i create a ticket for support, they tell me that the cannot help me because the can connect to my NAS propery. I tried from almost 5 different internet acces and cannot connect in annyway, neither http nor https.
Chicken and and egg issue ... but then it's not up to QNAP support to provide support for ISP provided or private owned routers by other manufacturers.
djlevi wrote:And another strange thing is that i can connect from myqnapcloud portal indirectly.
This does just proof that the NAS can reach the Internet and the QNAP cloud severs - what is essential of course.
djlevi wrote:I´m sure that if i had a little more info form qnap tech i could solve by myself. Its a webredirection issue quite clear for my, as long as http://xxxxxxxxx.com:8080/redirect.html ... 0347007155 is shown in browser bt i cannot analize the code in wed admin html/php because is too complex for me.
Very unlikely an issue here.
djlevi wrote:One last thing i can say is that i can connect to VPN which server resides in that NAS without any problem, so it seems not to be a network related problem as all people make me believe (mabe really i am wrong).
Come on guys, accept the challenge and help me to solve it.
As we don't know anything from your network, your router, and the NAS config (ie. using myQNAPcloud - Automatic Router Config for example ), or other appliances probably "fight" for the same limited ports doing UPnP forwarding - start with the myQNAPcloud -> Automatic Router Configuration -> [Diagnostics] .... the output might give us some insight and ideas (remove the public IP address before posting btw.)
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Hi.
I don´t have UPnP configuration enabled, neither on the router nor the qnap so is not probable that the problem would come from that.
The network is quite easy config. We have the standard isp router with only one network and there are no more appliances. Diagnostics output is not available as long as upnp is not enabled.
You think is not an issue but you really don't have the problem. I found another users that have similar behaviors.
It would be very helpful if someone knows how to debug the web admin access on the server or the client in order to know why redirect.html is stuck there.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Web access not working from wan

Post by schumaku »

Static IP assigned, or DHCP reservation for the NAS on the LAN?
Manual port forwarding for the ports required in place?
Ports forwarded not in use on the router for LAN or WAN services?
...
djlevi wrote:You think is not an issue but you really don't have the problem. I found another users that have similar behaviors.
Of course - but again, it's not a QNAP NAS issue: Crappy ISP routers, poor documentation , default or hidden or whatever services on the routers in place, ... prohibiting - what is supposed to be simple - a one to one port forwarding to the NAS LAN IP address.
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Hi.
Again, you think is not a Qnap issue. But is your opinion. I think it is.
Obviuosly The qnap have fixed ip as long as i have no upnp config. I always want to take control in network config so the first thing I do is assign a new ip to each new machine connected to the network and let a narrow ip range for dhcp. Then I configure each necessary port in Nat.
when possible I will change isp router to make sure and probe if it's a network or qnap issue.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Web access not working from wan

Post by schumaku »

With the NAS LAN interface is connected to the router, subnet masks on the router and the NAS are correct, the default gateway is set accordingly, and the source IP is not blocked ... that's _all_ the NAS has to deal with.

The ISP router does not use the port(s) assumingly forwarded - I know there are many permitting ports in use by the platform by manual or by UPnP IGD - so all "looks" correct, but in reality, it won't work.

Afraid, you share almost no information ... almost impossible to help. And yes ... the issues are similar for many other users, the list of issues discovered is endless.
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Hi.
I changed the router and the ip range and the problem is still the same. I dig into the problem as log as i cloud and i got some important information:
-I realized that the first html accessed when i´ trying to connect is /home/Qthttpd/index.html which changes port to 8080. Then it loads /home/httpd/index.html wich adds redirect info to url, getting the famous http://<qnap_domain_name>:8080/cgi-bin/redirect.html?count=<random_number> .Then it loads /home/httpd/redirect.html wich makes some http/https checks and redirect to /home/httpd/cgi-bin/Qts.cgi.
That is the file i cannot access from certain locations. I tried editing and tracing html in previous html files and it worked from everywhere (Hello world or whatever html code). But i cannot access to any cgi-bin scripts and they are not plain text so i don´ know how to continue. Also i like to tell that apache and web config is all managed in /etc/init.d/Qhttpd.sh script, where are a lot of info about apache variables and configs. Anyone can help?
Thanks.
djlevi
Starting out
Posts: 34
Joined: Thu Nov 14, 2013 7:15 am

Re: Web access not working from wan

Post by djlevi »

Anyway next week I'm going to reset the nas to fabric default and try again even in a different internet conection. Then I will close some mouths about if is qnap problem or not.
Then i will report my complains about how I've been treated by support crew. The most easy argument when you have no arguments is tell that is not your problem and is another's fault.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Web access not working from wan

Post by schumaku »

Having re-read the thread, still can't see the bigger picture. QTS access on the LAN is fine. Remote access from other sites or for other users does fail - few exceptions why ever. Using an alternate L3 path (and probably addresses?) to the same site and then remote to the NAS does work.

L3+: Any proxies in the play, differences with VPN?
L3+: Any in-line security appliances probably blocking things in some connections path?
L3+: NAS based VPN configs in the same or overlapping IP networks, interfering with the various networks involved?
L3: IP addresses?
L3: Data path with direct access vs. VPN ...?
L2: Path MTU discovery issues, ie. something blocking related ICMP messages?
...
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”