Wamp server only allows external connections from external ips - apache

It has been a while since I started using wampserver online, and until now it all went fine, but I recently started having a problem: I can access the server through a local ip (192.168.1.37 | 127.0.0.1 | localhost) if connected to my router or from my router's ip (e.g. 83.85.44.55) if im NOT connected to my router.
So basicaly if I'm connected to my router and try to access the servel with my router's external ip, I get a timeout error, whereas if someone from for example India tried to connect he would be able to do so.
I'm currently using wampserver 2.5 for windows with apache 2.4.9 and have already re-installed everything.
Thanx in advance.

Elemermelada -
Port forwarding can be tricky when you are trying to access the server from multiple networks (i.e. your internal network and somewhere else on the internet). You are able to access the server with it's local IP because you are on the same subnet and there is no routing being done. When you attempt to connect to your webserver with your router's IP address, you are never making it to the webserver, regardless of the NAT/Port forwarding in place. The traffic is being dropped by your router because you are trying to access it from the inside. Unless you have a router that can be configured in a certain way, you will always need to connect to your webserver by it's local IP address when you are on it's local network.

Related

Accessing localhost via a VPN connection

Goal
I am trying to setup a secure connection to a PC in our network.
The goal is to be able to access a domain, api.mydomain.test, on that PC, that is served by Apache.
Setup
To securely connect to the server, I have implemented the Softether VPN Server on the PC. The VPN network must be separate from our own local network, which the PC is also on.
The idea is to add an IP whitelist in the vhost record op Apache to allow only people on the VPN subnet to connect to the domain api.mydomain.test. Next to this filter, we also added a firewall to the PC to not allow any connection on port 80 or 443.
Issue
I can connect to the VPN perfectly and receive an IP ofthe subnet 10.11.12.x.
However, I can't seem to be able to access the server on localhost or via the IP of the other network the PC is on (10.10.2.x).
To be frank, I don't even know how to do this when connected to the VPN.
What have I tried?
Use a local tap bridge instead of virtualNAT and virtual DHCP.
This was not working as expected, because then the VPN clients (my laptop) did not receive an IP.
Add routes to allow 10.11.12.x IPs to access localhost.
According to documentation of Softether, the virtual NAT does not use the routes, so this would be useless for our goal.
What I do not know, is how this is normally setup?
I have the feeling I am trying to do this the wrong way, so any ideas or different approaches would be greatly appreciated!

Cannot access my self-hosted website on port 80, redirected to router's setup

Currently I am trying to host my own web-server. Unfortunately, I am running into a big issue with port forwarding. I have already routed the URL to my IP, and the web server is running on port 80. However, when trying to access my IP/website on port 80 (which is forwarded on my router) through any browser, the page that comes up is my router's web-based setup page. Apparently, its operating on port 80 as well, and I can't seem to find a way to get around it (when setting the Apache server to say, port 8080, the website works fine, but as there is no way to hard-code a different port into the URL, this really doesn't help). I'm definitely a newcomer to web-hosting, as this is my first attempt, so hopefully someone can point out a solution? The router model is a LuxulXen XWR-1750, if that provides any guidance.
You will need to setup Port Forwarding on your router so that external access on port 80 will be forwarded to the ip address of the PC running Apache.
See portforwarding.com for help on how to setup your router and what port forwarding means.
Additional Suggestion
If thats not the problem then you might check that the router is configured so it does not allow external Administration. If this is set to allow external administration maybe thats why you are getting sent to the admin config login screens rather than routed to the PC running Apache.

Can't Port Forward To Ubuntu Web Server

I've set up an Ubuntu Web Server to host a game that uses port 25565.
I've set the router to port forward that port to the web server and gave the web server a static local IP. I've done this before using my own PC as the server.
When I try accessing the web server on that port using it's local IP I have no problem at all.
But, when I try accessing it from outside the network, I can't connect.
I've opened my router's list of DHCP clients and the web server is only listed there sometimes without a pattern I've been able to see.
Why I think the error is at my router:
I've installed Wireshark on the server to see if Apache was somehow blocking the web packets upon arrival. I tried opening all ports and I tried opening port 10000 which webmin uses (I'm able to connect to it locally). Neither has been successful.
Although I'm not experienced in the field, I don't think the packets get to Apache.
Please assist. Thank you!
Does your router hold the external IP address, or an internal one?
If it holds a private IP like 192.168.x.x, 10.x.x.x, or 172.16.x.x, then you would need to setup port forwarding on whatever device your router is connected to.
I've managed to fix it by changing the web interface of the port forwarding from atm1.1 to ppp1.1. It was just luck, as I understood it's web protocols but I don't know why it worked.
Thanks everyone for the help!

How to connect to my apache localhost from a different network?

I am able to connect it if the two devices are in the same network but for example, if I use 4G on my android and turn of the wifi and try to connect to http://computer-ip-address then it just hangs and eventually errors out saying count not connect. The apache server is hosted in my local mac, and I've disabled my firewall temporarily. Any ideas on how to get a device using a different network to connect to my apache server on my local network?
You will need to configure your router so that it will forward port 80 from external to your mac.
Then, you can open http://your-public-Internet-ip on your mobile phone, effectively visiting your local web server.
If you don't like to remember your ip address, especially if you are on the go, the answer is dyndns or any free alternative, e.g. http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html.
Using such a service, you will be able to enter http://yourname.service.com into your mobile phone. You will either have to configure your router to always tell this service your current IP (check your router for supported services) or run a tiny program on your mac which will handle this.
You need to enable port forwarding on your router to forward TCP 80 (and possibly TCP 443 if you are using SSL) to your web servers IP address.
Once done, you should be able to access your site via your routers public IP address.
Take note that of your web server is using a dynamic address provided by DHCP, your IP may change and this would stop it from working. I suggest you give your web server a static IP address to stop this.
You will probably have a dynamic IP on your router as well, so you can request a static one from your ISP or you can sign up for a dynamic DNS service.
If you post the model of your router, we may be able to give you more specific instruction on setting up port forwarding.
i hope your httpd.conf is set with port listening to
Listen 80
also, you can only access your site from your LAN otherwise, your server would need to be reachable from a public IP address, not a private one over an internet 4g connection, that means a diferent network
bonus points, if you try to reach your server from an external address, did you configure portforwarding on your router ?
If you could immediately and immediately connect to your localhost using your 4G network, then most likely anyone on the internet could do the same. It is important to understand that there are two components to the answer to your question:
Securing HTTP access (port 80 or whichever) from the internet. You probably don't want to open a wide door to your local network.
Configuring addressing from your client (in this case your phone) to your local computer (in this case your Mac). If the latter does not have a public IP address, then you will have to configure your client to hit your router instead, and to configure your router to forward accordingly.
Given that this is mostly system configuration work, I'm guessing that Serverfault would be a better place to find a satisfying answer.

getting router confuguration page instead of my web home page of my website

I am trying to host a website from my local pc. For that i have installed apache server, registered a domain name and done the necessary settings.The problem is that when I am trying to access my homepage I am getting the router configuration page, same is happening when I am trying to access the website from other computer.Please help.
When hosting a website from a local PC behind a router you need to be careful to use the public IP that your service provider has given you. Beware this is often not a static address and may change frequently. To address this you can use some type of DynDNS service if your router supports it.
Second, you will need to add a rule in your router's firewall to allow the traffic from the public internet to reach the computer behind the router. This can be done either with a DMZ (less secure) or a port forwarding.
When you are trying to access the web page, type in the local ip of the computer you have setup the server on. This should take you to the apache server. You are likely just typing in the wrong IP. Try something like http://127.0.0.1/ (127.0.0.1 is the same as localhost) to make sure you get the apache server from the computer that is running the server.