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!
Related
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.
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.
I am having an issue and I am not sure where to go, hopefully you guys can help me out here.
I have a virtual box machine that has a bridged network, therefor the device is on my LAN and there is network connectivity to the device.
I can connect to the web server using my local ip adress 192.168.2.41:25878, however when I try to connect to it with my public IP address x.x.x.x:25878 the web browser is waiting for a connection but it never seems to establish.
Here are my config files for Apache2 / Vagrant
VagrantFile - https://gist.github.com/anonymous/7cca95da3cfc22de5333
Apache2 Site - https://gist.github.com/anonymous/d60efd938d9d7d7de60e
Ports.conf - https://gist.github.com/anonymous/8b0c20a78b36cc5d03b0
The port forwarding is correctly set up on my router. What is really puzzling me, is that I am able to connect to the web server using the local IP address 192.168.2.41:25878, however I cannot access it via the public IP address. The web browser is not rejecting the connection, so I am assuming that I have a config error somewhere, specifically in apache.. The web browser shows a spinning wheel when trying to connect.
I've been trying to solve this issue for almost a week now.. I would appreciate any help that you guys may provide.
SOLVED
So I am not sure why the setup above was not working... I changed from bridged networking to NAT and setup host to guest port forwarding through Vagrant (VirtualBox) and it started working!
I also switched to Nginx instead of using Apache.
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.
I'm using Windows Vista, I have Apache installed already. Apache is working great, but I want to allow my website to be viewed publicly.
When I entered my ip address(the one hosting the website) on other computers, the page doesn't show up. It just loads but don't show up.
How can I edit my httpd to allow everyone to have access to my website?
Thanks
-- EDITED
Yes, I forwarded it already. Here's the screenie:
alt text http://www.picamatic.com/show/2009/02/26/09/29/2470958_522x128.jpg
Is it correct way? Or do i need to change the port?
You will need to configure the server's firewall to allow incoming connections, and your router to forward connections to the servers.
Also be aware that many ISPs block incoming port 80 connections to avoid having their customers host their own sites (Check your ISP's contract, you may be violating it by hosting a web server)
It's possible to set your router to use a different port and forward it as port 80 to your server if your ISP is blocking port 80. Check with your router's user's manual about forwarding ports. Some routers might not support changing the incoming port to a different one, in which case you would have to change the port Apache runs on as well.
From your screen shot set the public port to something other than 80 (by convention use a port between 1024–49151), and leave the private port to 80.
Also, make sure you're using your public IP on other clients. Do not use the 192.168.. addresses, they're meant only for private networks.
Outside users should then be able to use the link http://[your public router IP]:[new port] to connect.
Be sure if you are using any type of router that you enable "IP forwarding" otherwise your server remains hidden behind it.
This option can be changed on the configuration webpage for the router.
`bstpierre' is correct in that some ISP's block port 80. I use port 8080 myself. Good luck!