Cannot access http server (apache2 on Webmin) from WAN - apache

I've already opened the port 80. It worked perfectly, but after some changes it left working. Webmin runs on a Raspberry Pi with Raspbian.
1. I tried to solve an ip issue, because my router changed my ip so quick that I had to update my ip on my Webmin server every time it changed.
img1
2. So I decided to change the ip to 127.0.0.1 in all of my servers. Like this:
img2
3. Then, cause now I could't access to my server from outside of my LAN. I tried to reset my eth0 ip again as it was in all of my servers (as 192.168.1.89), but it didn't work. I still can't access my http from outside.
4. I waited my eth0 ip to change to update it again (to put it instead of 127.0.0.1), but didn't work. I tried to do it like this: img3
As I said, it worked perfectly before changing the ip to 127.0.0.1, because my normal ip changes too fast (every 7 or 10 mins). I can access to my http server but only from my LAN.

Well, finally I found the solution. The problem was nothing about my Apache or Webmin configuration. It was about a problem with my router. Apparently it had a bug: The DMZ seemed as activated, but it really didn't (my router is a HUAWEI HG659).
Also, if you get this kind of problem, you should first check what ports are being used by your computer, and check if you have any firewall or program blocking that port.

Related

Can't access Apache Server through IPv6 from outside

My goal is simple : I just want to access my Apache Web server installed on a Ubuntu Server on a local PC behind my box in IPv6.
Using NAT, I can do it with IPv4 but it's a little bit "headache-able" to keep it work with a domain name and SSL. So I tried to make it work with IPv6, the IPv6 of my server is public and I just have to complete the AAAA of the domain name.
The problem is : I searched and tried a lot of things, I learned a lot but the problem is still complete !
The situation :
Ubuntu server shows the good IPv6 adress when I do hostname -I
I can ping my machine using a external website (dnschecker for example) from and outside my local network DNSchecker capture
Apache is configured to use IPv6 adresses and serve pages when asked from the local network BUT it does NOT work when accessed from outside (my problem !)
ufw is configured to use IPv6 tables, allows Apache then Apache Full ufw status
no firewall on my internet box
I'm dry, I don't know what to look for in order to solve this problem. I need help, thanks for your ideas and advices.

weird wampserver ip/port conflict

Ok, here is my problem:
I am runing WampServer 2.5 on my windows 7 Home Premium PC and I have a TP-Link TL-WR642G v2 router updated to the latest official firmware (download site). I have forwarded port 80 to my pc (ip 192.168.1.111, static) and disabled all the firewalls (see images). When i turn on WAMP, and enter localhost or 127.0.0.1 or 192.168.1.111 or even my wan ip (93.103.90.XXX) everything connects and I get my test html page but when I enter my wan ip on any machine that is not connected to my router the page doesn't load - i don't even get 403 forbidden (and yes my wamp says server online an i have edited the httpd.conf). Also http://www.yougetsignal.com/tools/open-ports/ and http://www.whatsmyip.org/port-scanner/ say port 80 is closed/timed out. Everything worked fine a week ago and i could access my server from anywhere with my public ip. I also tried other ports but i get the same thing, tried WAMP 2.4 with no success. All i did from last week was downgrade from Ultimate to Home Premium and install the drivers of course (but I guess that has no effect) and upgraded my router firmware (linked above). Any idea why it doesn't work? Does anyone have the older firmware, so I can try downgrading to it?
Thank you for reading, David :O
If you haven't done so already; then change the Management port of the Router to something other than port 80. That way you aren't conflicting with the WampServer. This is more than likely the issue.
You shouldn't have to change anything in the Firewall as Virtual Servers will set a rule to allow the packets.
As a test can you try to open up other ports on your computer like SSH or Telnet. If you find the that forwarding settings work to these protocols then you know the issue is not with the Router or ISP, but with a firewall setting on the Computer.
You can use this site to see if your ports are open (if you are on the LAN): http://www.canyouseeme.org/

Unable To Connect To MAMP Server From Other Devices

I have MAMP PRO running locally on my machine (Mavericks). I can connect find to localhost and apache is running on port 80.
The test website I have set up is served. I can browse to it via http:// my-local-host (have to put a dash in because stack exchange doesn't like URLs) or http://mymachinename.local or http://XXX.XXX.X.XX (my ipaddress).
It's not working remotely though from either iPhone or iPad. I have tried turning off the firewall. I have tried adding a rule to the firewall to allow incoming connections to httpd. Neither work.
I also have Little Snitch installed. I tried turning off Little snitch and also creating a rule to allow traffic through to port 80 via httpd. Neither work.
Anyone else had similar issues and found a resolution?
The problem is DNS.
MAMP writes your Hosts to /etc/hosts.
Example:
127.0.0.1 example.com
Your Iphone's host file has no such entry. This is why it does not work.
You need e.g. a "DNS-server", which you can enter in
Settings - Wlan - static as Router on your phone.
I think your problem would be addressed if you use the Dynamic DNS option in MAMP PRO. Then, using a third party company like noIP.com, you could setup myTestBox.ddns.net and pull up your website on your iPad.

Localhost page can't be accessed from some ip's and proxies

I have apache installed listening to 8888, and port 8888 oppened, due the fact that 80 and 8080 are blocked by my ISP. I have no firewalls running.
The page hosted on my computer, works from some proxies like http://www.webproxyonline.info/ for example, but doesnt work from some others, like zend2.com.
I also tested to access the page from 2 dedicated servers that I own, but without success. I can ping my computer IP, but when I type wget myip:8888 i get nothing.
I also tried to run the code file_get_contents('http://myip:8888'); but no success too.
What can be causing this problem?
thanks.
UPDATED: PROBLEM SOLVED.
The problem is that the firewall CSF on my dedicated server was blocking outgoing traffic to my ip.... I just added my ip to the alloed list...
Um, if you're actually binding localhost (that is, 127.0.0.1), then it shouldn't be accessible from other machines. That's how localhost works. You need to bind a actual external IP address for your machine.

Apache stopped working on LAN when on reboot

I set up an Apache server on an old laptop last night (apache2) just to play around on. It worked fine on my laptop, and I could get web pages from it from other computers on my local network. After rebooting the computer, however, the Apache server is not visible on the local network.
nmap TCP connect(), Syn, and ping scans showed that the host was down. An nmap -PN scan, however, showed that the host is up and all 1000 scanned ports are filtered.
PHP, MySQL, and PhpMyAdmin are all still working perfectly on localhost, the only problem I can find is that nothing works on local network.
Thanks in advance for the help.
You havent said on your OS, but, there could be a local firewall, or, a change of IP (it could be DHCP) or DNS hasnt caught up properly with DHCP..
a netstat -a should tell you what ports are being listened on. Check its not just listening on 127.0.0.1