Access my xampp server through my public IP address wouldn't work - apache

Hey Guys I am trying to configure my xampp server so that people outside the LAN can access my website through my public IP address. I know there are many answers out there and I have tried them all but it still wouldn't work. So here is the description:
I am able to access my xampp server through localhost, 127.0.0.1, and 192.168.1.xxx ip addresses but when I type in my public ip address it wouldn't work. (I am a college student and I live in apartments and I am pretty sure that we all in our community have the same public ip address) Any way, I forwarded all the ports by signing into my default gateway.
The strange thing is when I login to my router default gateway(192.168.1.1), under the status tab, I see what is call the Internet IP address for ipv4 which is 10.12.xx.xxx which seems to be unique but is not my public IP Address. So I tried accessing my server through that address and it works. I can also connect to the server by connecting to my roommate's router with the same IP address 10.12.xx.xxx. Then I try to connect it through my mobile which is connected to my wifi, that works too. However, when I switch off the wifi on my phone and get on 3g I can't access my server. So I can only access my server over the LAN(My community). Is there any way I can access it over WAN?
Any help would be greatly appreciated. Thanks in advance

Related

Cannot acces to my website through my company LAN network

I am trying to publish a website using a wamp server v3.0.6 located on my own PC. I can access the site from my PC using the domain name "mysite.com" and ignoring the proxy for this site. The problem is that I can not access from other PCs that are on the same LAN network of the company. When I enter "mysite.com" in the browser of another PC without a proxy, an "Unable to connect" message is displayed, and with proxy, it leaves :
Network Access Message: The website can not be found.
Error Code 11001: Host not found
Background: This error indicates that the gateway could not find the IP address of the website you are trying to access. This is usually due to a DNS-related error.
The firewall of my PC is turned off.
What could be the problem?
mysite.com is a domain name. I don't know how you have managed to direct this name to your local machine (editing the hosts file is the simplest approach for that), but you have to make all other computers know about the name-ip pairing you have used. And you need to pair the name with an address that is visible to others (localhost won't do it). If you have a machine that is part of a corporate infrastructure, you might already have a canonical name for your PC, like pc00144.yourcompany.com. If there is no firewall on your PC or the port you are using to serve the web content is open, then all who can ping your pc should be able to connect to your site. If it is the only site in your wamp and it is not configured to use virtual hosts, than it should be connectable by IP also.

How to make a Public website access to other PC within the LAN?

I have a Huawei HG256s router (local LAN IP 192.168.1.1) which is configured to with a local IP 192.168.1.10 as DMZ to my WD MybookLive. I also have another buffalo NAS which has IP of 192.168.1.11. I setup a web server on the MybookLive and using the public IP available from the Huawei router, I can visit my website. I am able to access both MybookLive and Buffalo NAD within my WIFI LAN, but it does not work via internet. My question is how can I make a website that will allow me to access to my buffalo NAS from internet? Any advice will be helpful. Thanks you for reading.
Normally you set up a port forwarding.That can be done in the router menu.
Afterwards you can access the service running on the port via the public IP on that specified port.

Unable to access a locally hosted wcf service over the internet

i have hosted a wcf service in our office machine and which is being accessible from other pc in LAN. our office has static IP. so how can i access my wcf service from the out side of office if i know the static ip of our office.
now i am accessing the service from lan using this url http://192.168.6.2:7741/Services/CustomerService
if our office static ip is 122.160.187.236 then can i access my service just replace the ip address with static ip address ? please tell me all require steps to access wcf service over the internet. thanks
You will need to forward the port 7741 on the router to the 192.168.6.2 IP address.
You'll have to ask someone who has access to the router to do this.
Not sure what your environment is like but on your general router these settings will generally fall under 'advanced settings > NAT
Check out http://portforward.com/ for info on port forwarding.
Also, if you have a firewall, you need to ensure that traffic via port 7741 is allowed.
This is probably the quickest way to achieve what you want, but not the most secure. Establishing a VPN would be better but I'm not going to open that can of worms now.
Niel
it's not enough to know only IP of your network if you want access your machine from outside. Probably you should talk to administrator of your network to either establish virtual private network or assign external IP address to your machine. Actually the question related mostly to network administration and configuration, but not to WCF.
If you want to access your WCF Service from outside your LAN, from the internet, you need to assign a DNS Server outside on the internet that can assign to you a public static IP Address, because your LAN is most probably using a DHCP to lease a temporary static private IP Address. Some DNS server are free and other you need to pay a monthly fee.

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.

How do I access my own website hosted in my machine?

Forgive me if this is a stupid question.
I am running XAMPP (lite) for developing my website. I can access it through http://localhost/mysite
I wanted to view it on another computer (just for testing purposes), so I went to whatismyip.com, got my ip address, and tried to access the site from another computer using http://xxx.xxx.xxx.xxx/mysite
Am I doing it right?
Anyway, I get a "Enter your username and password" prompt. I've tried the following usernames and their passwords: 1) My computer name 2) My windows login username 3) My database username
None of them worked. I already have my firewall OFF.
Any ideas?
If you are behind a router, then the credentials you are prompted for are those of the router.
You will have to setup your router to forward HTTP traffic (port 80) from outside to your PC if you want others to view the site.
Apache might only be binding to localhost. Open up a command prompt and do a netstat to see what address is being bound to on port 80. While you are at it, do an ipconfig /all to see what the IP address is of your machine. If you have a DSL/cable router, you probably have a private IP address which by default isn't accessable from the internet unless you setup port forwarding. If you want to access your computer from inside your home network, try accessing it using the IP you got above. If you want to access your computer from the outside, read the documentation for your cable / dsl modem / router to see how to setup port forwarding.