Install Apache server on 4G Network - apache

I have installed XAMPP to run Apache server on windows,So the Apache server run great on LAN (Local Area Network ).
But i need to run the server ,so the public can access it from WAN
(Wide Area Network) .
I have forward HTTP port 80 on 4G portable router ,but no device can access the Apache server from Public (WAN)
** I have tried DDNS solutions also with no success.

The issue is most likely the 4g network itself. It seems they don't allow servers to wait on their network.

Related

Making `http-server` visible across the network

Running npm's http-server will sometimes launch a server accessible from a (mobile) device on the same network.
> http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://10.0.1.7:8080
http://123.456.78.90:8080
Hit CTRL-C to stop the server
and sometimes launch a server that is visible only from the same desktop.
> http-server
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://10.0.1.7:8080
Hit CTRL-C to stop the server
How do I use http-server to launch a web server that's visible from any device on the same network?
The presence of http://10.0.1.7:8080 should by itself indicate that the server is visible across the network, no?
Why does the third address http://123.456.78.90:8080 appear only sometimes. Both launchings are identical.
All this follows npm install -g http-server of course.
Update 1:
http-server -a 0.0.0.0 is the default. (Hence it need not be specified.)
Update 2:
Using
python3 -m http.server --bind 0.0.0.0
is more predictable/reliable, but then one has to go muck around in ifconfig's output to find the IP revealed so nicely by npm's http-server.
It should always be available to anyone in the same network as your computer under your computer's IP followed by the port.
The third address, I assume, appears because at the time you were connected to two local networks at the same time, so that the http server would be available at that IP - which is also the IP of your computer, but in the second network.
So in short:
http://127.0.0.1:8080 is the IP that is used to connect to the server from WITHIN the machine it runs on.
http://10.0.1.7:8080 and any subsequent IP is the IP used to connect to the server from any device that is in the same network. As many IP's appear as how many local networks you are connected to.
This has nothing to do with npm, it's just how the network works. Python's http server just doesn't list the IP's for you.
Let's try to exclude some obvious cases:
What error message do you get? Do you see a connection timeout page in your browser?
Is your mobile phone connected to the same router the http-server machine does?
What is the IP of your mobile phone? (i can see it e.g. in my router)
You don't use any vpn on your other device, do you?
Do you see the right result when you call it locally?
Can you ping the http-server machine from any device within your network?
Did you try to use another port e.g 80?

Static IP, PI. raspbian jessie

Okay, here's the situation I am in. I have a raspberry Pi 2 model B. I have Raspbain Jessie installed as the OS. I have Apache installed as well. I have a web server running and i am able to edit it and access the site from different devices on different internet connections. I want to be able to connect to my RaspPi through SSH on my MacBook Pro. I am able to do this while on the same network. My Pi is plugged into the router via an Ethernet. What i have tried is, logging into my router and reserving an IP for my Pi, i also entered my MAC address here. I have gone into the port forwarding options in my router and have it set up as: HTTP, TCP, Server address(the one i reserved) my Ipv6, and Start port 80, end port 80. Ontop of that i have gone into my /etc/dhcpcd.conf file. There at the end of the file i added
interface eth0
static ip_address=10.0.0.100
static routers=10.0.0.1
static domain_name_servers=68.44.180.118 2001:558:feed::1 2001:558:feed::2
The guide I followed is attached here and follows other guides i have seen.
http://www.circuitbasics.com/how-to-set-up-a-static-ip-on-the-raspberry-pi/
Yet when i try to SSH remotely i cannot get a connection, and when i connect on the same internet i can connect as normal. Please if anybody sees what could help .
Your router's firewall is probably blocking the ports for SSH, which does not use port 80 (in raspbian, I think its default is port 22). If you are going to take the risk of leaving your SSH open to the public, you should probably switch it to a different port other than the default before opening up a port on your firewall. The Raspbian Community has a thread on how to properly change SSH's default server port. You'll also need to make sure your SSH client is using the same port. You will need to leave 80 open for web, and also forward the SSH port, which ever you choose that to be (22 is the default).

Apache home server connects to domain inside network and not out

Hello i have an old windows xp pc im trying to turn into a server for hobbyist purposes. I downloaded and installed the apache xampp 1.8 distribution. Once installed and tested that the localhost worked, I connected my domain to my servers ip. So my problem is when i tried to connect to my site on my pc on the same network, they all were able to load the domain/site inside the network successfully but when i have a pc thats outside the network try it fails. Any ideas?. thanks.
You have used a private IP instead of public IP so it does not get resolved to your server. You have to use a public IP (if you have a static IP from your provider you have to setup port forwarding on your router.) If you get the IP from DHCPD server you will need to use dynamic DNS and port forwarding.
More info on private networks: http://en.wikipedia.org/wiki/Private_network

I cannot access the default Apache webserver page, which is hosted in a VirtualBox VM, from my machine

My machine is a regular laptop with Windows 7. I have a Virtualbox VM running Ubuntu Server 14.04.1 and I have apache2 installed. When I try to access the default webserver page (10.0.2.15) from my machine, it cannot find the page. I have disabled my machine's firewall so that isn't causing the issue. The network for my VM is NAT, but I also tried the bridged adapter setting to no avail. Any suggestions would help.
Can you ping the server? If so, try the netstat command in server terminal to determine if it listens to port 80. If you cannot ping it, check the network address, f.x with ifconfig
If you can ping apache from the server, you probably have a problem with the network.
Try to add an host only interface. Then, in your VM, sudo ifconfig. Use the eth1's ip.

IBM Server configuration

i have an ibm server, a tp-link router with an static ip and DHCP activated, i want to configure one of the net boards in the ibm server.
I installed Ububntu server and access to the net board configuration using this command:
vi /etc/network/interfaces
I configure the server with this
address -> i put an ip that i resrve in the router
netmask
network
broadcast
gateway
I have a subdomain from no ip i have entered in the server so i can do remote connection to the server throw this subdomain and ssh. I have put the subdomain in /etc/host.conf
The thing is i have access to the subdomain in the web and out of the LAN net. But when i try to connect to the server throw ssh it's gave me connection refused.
EDIT:
Using the command arp-scan -I eth0 -l i found that the IP of the server is asigned two times it's look like it's the same ethernet board with two MAC address thar are the same except the las number.
Ok, what's work for me was to reinstall openssh on the server and in my computer. After that I have access throw ssh.