Can't reach WAMP server with WAN IP - wamp

I'm trying to access my WAMP server through my WAN IP.
My network infrastructure consists of a ISP's modem and a wireless router. Using win7.
I have setup the WAMP server on my laptop. I connected my laptop directly to my ISP's modem with a Ethernet cable and received the IP address 91.105.100.XXX. I was then able to connect to my WAMP server through this IP.
I disconnected my laptop form the modem and connected my modem to the wireless router. Then I connected with my laptop to the wireless network and tried to use the same IP address 91.105.100.XXX to access the WAMP server.
It was working for a while ~10 minutes. When joined to the wireless network I obtained another IP address - 46.109.65.XX. I tried to connect to the WAMP server using the new IP address 46.109.65.XX, but was unsuccessful. I am not able to reach the WAMP server when I’m connected to the wireless network through the WAN IP. Localhost works fine.
I have enabled port forwarding in my wireless routers configuration.
Tried to turn off firewall - no succes.
http://www.whatsmyip.org/port-scanner/server/ - show's that all ports are timed out.
Maybe I am doing something wrong or am I missing something?
Thanks for the help in advance.
UPDATE
I discovered that the main problem is with my 80 port, that doesn't want to work. When I use the port 8080 in configuration everything works fine. I even installed IIS and discovered the same problem. Both ports are forwarded in the routers configuration. I have a TL-WR740N router. After looking around for a while in settings I noticed that the routers web management port was set to 80, so I changed it. But the problem persists.

The modem is what talks to your ISP and therefore it is the modem that will be allocated a WAN IP address.
The router has a little DHCP server running in it and this will dynamically allocate IP addresses to your internal hardware as they power up their network cards. This could be your problem as when you were connected directly to the router your Laptops IP Address would have been 91.105.100.XXX but now it will be something like 192.168.X.Y.
So to run a server on the laptop you must configure it to NOT USE the DHCP allocated internal IP address or your port forwarding will only work if your laptop luckily gets the same internal ip address from the router each time you reboot the laptop.
So go to Control Panel -> Network and Sharing Center -> Change Adapter settings. This should get you to the Network Connections page of control panel.
Left click on the icon for your Wireless Network Connection and select Properties from the dropdown menu. On the properties dialog double click the Internet protocol version 4 (TCP/IPv4) line in the list to load the Properties dialog.
If you see a checkbox called Obtain an IP Address automatically and it is checked you are getting your ip address from the routers DHCP server.
Click the Use the following ip address checkbox and enter a valid ip address in the subnet range that your router is configured to allocate. It probably something like 192.168.0.x. Its a good idea here to check with the admin pages of your router, find what range the router is allocating and also there is normally a way of telling the DHCP server to allocate ip's from a range, for example it could be 192.168.0.100 to 192.168.0.200. This is the number range that dynamically allocated ips will come from, so you want to pick an ip for your laptop that is not between 100 and 200 so for example lets say 192.168.0.10. They do this expressly so you can setup servers with static ip address's. Some manufacturers leave high numbers for servers and some leave low numbers, so check your router.
It should look something like this, BUT CHECK YOUR OWN ROUTERS NUMBER RANGE!
Now your laptop is setup you now need to go and redo the port forwarding so that any communication on port 80 from the outside world is forwarded to port 80 on the static ip address you have just allocated to your laptop. Now comms should flow through the router to yout laptop.

Related

Nginx site cannot be accessed through domain URL

The problem:
I have set up a (Docker) Django-Gunicorn-Nginx site on my home network. It works on the local network but I cannot access it through my domain.
The setup:
Registered a domain in namecheap.com.
Set up a dynamic DNS to update my public IP with the namecheap domain.
Set up the website on a computer in my home network and give it a static IP.
Enable port forwarding from public 80 to LAN 80.
The tests:
I have enabled port forwarding on the port 22 and I have been able to connect through SSH to the computer serving the website with ssh user#domain and it worked well -> domain/ddns ok.
I have accessed to the website from another computer connected on the same LAN by using the full static IP to the computer serving the website and it worked well -> website/server ok.
I have called my ISP to check if everything is set up correctly and if I am allowed to serve a website form my network and apparently there are no issues -> router/network ok.
The clue:
When I try to access the site from outside my home network, through the domain or my full public IP, I get an ERR_EMPTY_RESPONSE.
When I try to access the site from my home network, through the domain or with the full public IP (not through the LAN IP which actually works), I get redirected to the page 192.168.0.1/intercept.html which contains a message from my ISP saying that I do not have connection to the internet (which I actually have):
So, at this point I am a bit lost. I'd like to get ideas on what is the best way to troubleshot this situation.
As #ben5556 suggested, I tried port 8000 and it worked :) So my ISP is probably blocking port 80.
First I tried port 8080 but while enabling the port forwarding on the router configuration page, it showed a warning stating that this port is reserved for other stuff so I tried with port 8000 instead.
This is annoying since I called my ISP and they said that there should be no problem in using port 80. Moreover, there is no warning at all when enabling port forwarding on port 80.
UPDATE
Serving the web on public port 8000 makes no sense since browsers default to port 80, so the final solution has been to enable port forwarding from public 80 to LAN 8000. Apparently only LAN port 80 is blocked so this solution works nicely.

How do I get Virtual Box to access an IP other than default localhost

So I know to access my host computer's localhost from virtualbox, I can hit up the IP 10.0.2.2. However, I need to access a different IP on my host. I've set up another local site running on host at 192.168.7.9. How do I hit this IP from inside virtualbox? Thank you.
Your virtual machine is probably in NAT networking mode.
You need to change networking to Bridged and choose the same Network adapter
like i did on the image below...(on my laptop wifi NIC is Intel Centrino, yours is probably different!)
Then your virtual machine will be directly connected to the same network as your laptop and it'll have a similar IP address as your host... 192.168.7.x
and then you can connect to any IP address you want!
This would be the simplest way to do it.

pfsense: Can't access web console when using virtualbox

I've installed pfsense 2.3 x64 in virtualbox with 2 adapters; One is bridged to my wifi adapter (adsl modem) (WAN) and the other one set as'Internal network' ('intnet') (Lan);
The problem is that although pfsense can automatically detect dhcp over first adapter and get an IP but my system (the host) can not ping the pfsense server (pfsense can ping both adsl modem gateway and the host).
Note1: Disabling the antivirus and firewall (kaspersky internet security 2016) has no effect.
Note2: I know that this setup works because I use the exact same network configurations for a Kerio Control server (v9.0.2, installed in virtualbox)
Note3: If I constantly ping pfsense server in my host (ping 192.168.1.102 -t) and at the same time restart pfsense server, during the booting phase of pfsense I can get two pings!
After contacting the pfsense official forum, it turned out that the WAN interface blocks everything by default. Therefore, either a rule should be defined to allow WAN to accept traffic or access server from LAN side.
I figured this out without having to go through the WAN interface, answer is on the pfsense forum
Configure host-only network "vboxnet1" (or any of the other host-only networks if you're already using vboxnet1 for other VMs) with the following:
192.168.1.77 (or whatever IP you want your host to appear as on the network)
255.255.255.0
DHCP Disabled
The make sure that the LAN adapter on your pfSense VM is a "Host-only Adapter" and that it's using "vboxnet1" (or whatever network you configured above)
Reboot/re-install and http://192.168.1.1 should work now

Winsock not connecting to WAN IP addresses

I'm wondering if anyone can give me reasons why Winsock is not connecting to WAN IP addresses.
It only connects to my LAN IP address or the looping address 127.0.0.1.
I'm running the client and the server on the same computer. I first run the server program, then verify that it is in fact listening on 0.0.0.0::3307 from the command prompt, then make the appropriate port forwarding by routing port 3307 to the computer in my LAN running the server. But it still cannot connect. I have also restarted my router.
What could be causing my client not to connect to the server running on the same computer?
I guess 0.0.0.0 as listening Adress is the Problem here.
May you inform yourself about IP address rooms and reserved addresses in detail.
Not quite shure, if i got you right here, but if you're able to get a connection using localhost's address or LAN IP Address everything's allright.

How to enable connection to virtualbox machine from outside the Host (i.e. from any PC connected to Internet)

I have a Host with VirtualBox installed and Guest installed (both with Windows XP SP3).
I do have connection between them. And also the guest have an internet connection.
I can connect via Remote Desktop Connection from Host to Guest, but I also want to be able to connect to Guest from any other PC. If can, how to achieve this?
Guest is using 2 network adapters, one NAT for sharing the internet connection and then one Host-only to be able for both machines to see each other on the local network.
Assuming you have an Internet router providing access to your ISP...
Change the VM networking from NAT to Bridged.
Check that the guest still has Internet connectivity after rebooting or ipconfig /renew.
Configure the router to give the guest a fixed IP address. (Typically, the guest can still use DHCP but the router is configured to give the guest the same IP address every time.)
Determine which ports and protocols needed to connect with the guest. E.G, TCP on port 3389 (RPD) for Remote Desktop.
Configure the router's "port-forwarding" feature to route external connections to the IP address of your guest. You can designate a different port for the external connections but that might not get through firewalls between the remote computer and its ISP.
Determine the external IP address of your Internet router.
Connect from the remote computer to the IP address and designated port.