Not able to connect to my server - server

I have a small local network, with the following devices: a router , a Dell laptop running Ubuntu 16.04 LTS as my server, and another HP laptop to test access.
My IP addresses look like this:
router: 192.168.0.1
server: 192.168.0.101
laptop: 192.168.0.100
I have successfully setup LAMP and have one small page (/var/www/html/index.html) with one picture. I can't access this from my HP laptop by entering 192.168.0.101 into Firefox or Chrome.

In order to access your server you have to make it publicly so I will describe the steps required to do it:
Login to your router, search for Port Forwarding section and forward the port 80(HTTP Port) to 192.168.0.101(Your Web Server). You can find a guide for Port Forwarding after selecting your router model here : https://portforward.com/router.htm
Access your webserver by your external Ip. http://yourexternalip
(Optional) If you have dynamic Ip, you can set a Dynamic DNS to create a domain name that will always point to your webserver even your Ip will change after a router reboot or something like that. You can read this guide for setting up a DDNS: https://www.howtogeek.com/66438/how-to-easily-access-your-home-network-from-anywhere-with-ddns/

Related

Can't find which port to use in port forwarding

I have a webserver with different IP address from my LAN.
webserver - 133.3.33.166
internal network ip (local host) - 192.168.1.10 (xampp)
I need to run an app online hosted in my localhost. Currently I am using ngrok link inside an HTML iframe tag in my webserver to access those apps inside my local server. After I installed SSL in my webserver, apps can not be access anymore. No error messages, only a blank white page in my browser.
I need to find what port I should use for port forwarding if it is possible. Thanks.
Tried some ports I found using netsh -ab. PLease help.

How can I set up virtualbox to connect to both external internet and localhost.mysite.com server?

I am trying to use a Virtual Box VM to create a development environment I can share with a few dozen other developers. We are all on an internal network and need to connect to external web sites via proxy server. On the VM (guest) I am putting:
windows 10 64 bit
weblogic server
Several other dev tools
My requirements are:
From the guest OS I need to be able to hit the internet (ie google.com)
From the guest OS I also need to be able to open chrome and hit the server webpages running on the guest OS using mysite.com:8007/index.html.
I have modified the guest OS host file such that 127.0.0.1 maps to mysite.com. Ideally that should mean anything going to mysite.com will get resolved to 127.0.0.1.
Our proxy to reach the internet is http-proxy.mysite.com:80. I am able to connect to the internet (pages like www.google.com) as long as I enable the proxy (http-proxy.mysite.com:80) in chrome proxy settings. However I need to be able to enter mysite.com:8007/index.html in the browser and be able to load the homepage. I am able to hit the server using localhost:8007 but I need mysite.com:8007 to work since authentication cookies wont get passed correctly to localhost:8007 urls.
When I enter mysite.com:8007/index.html in chrome it keeps trying to redirect to the IP address of the host OS 10 . * . * . * and the server is not running on the Host OS.
When I enter 'curl mysite.com:8007/index.html' in a command prompt on the guest OS it actually does prints the correct response from my server (no idea why chrome is different / not respecting the host file config).
Any idea how to configure Virtual Box or chrome such that the external pages as well as the guest server pages work?
For internet access on VM, you need to configure network card as BRIDGE, NAT or NAT NETWORK. In your case NAT NETWORK will be better solution, because this will allow you bo be you VM visible in network, just like your Host.
If you have and Internal network you mus have also another card configured for VM for internal network.
To be your VM accessible from Internal Network via http... the coomputers in network have to setup DNS entry pointing to your VM.

Reverse OpenVPN connection

I am close to getting this to work but need some assistance.
I have OpenVPN Access server running on a Droplet in Digital ocean.
I have a RaspberryPi with a wireless connection on my network.
IP = 192.168.20.205
The user the pi connects to the Access server is set to be a VPN gateway with :
Allow Access From: all server-side private subnets
Allow Access From: all other VPN clients
192.168.20.0/24.
I have another user that connects to the Access server without the gateway settings.
When both users connect I can see them both in the web GUI of the access server with an IP assigned. 172.27.232.XXX
Now from the remote user I can ping the Pis 172.xxx.xxx.xxx IP address and even SSH into it using the 172 address.
However, it seems like the Pi isn't bridging / routing correctly or getting stopped by a firewall, as from the remote user I cant see the local network 192.168.20.xxx.
any pointers for me here?
Thanks!
The solution to your problem is clearly explained here:
https://openvpn.net/vpn-server-resources/site-to-site-routing-explained-in-detail/
You have to set the static routes on both routers and set the ip forward on the raspberry pi

Mikrotik direct ip to server on subnet

Please, advice on how to set the public IP address/domain name for a web page to be forwarded to a specific server machine on a subnet (say, 192.168.1.77). Can this be done via Mikrotik GUI interface?
An outside IP or assigned domain do not do this automatically, Mikrotik doesn't pick up the server behind a subnet if one does not set the path to it. I've seen a couple of tutorials assigning a server IP address in Mikrotik terminal with "masquerade" command but wonder if this can be done via Mikrotik Webfig GUI.
You need 2 things:
dst-nat to WEBserver
Default route on WEBserver set to Mikroitk
/ip firewall nat add chain=dstnat dst-address=PUBL.IC.I.P dst-port=80 or 443 action=dst-nat to-addresses=192.168.1.77
You must disbale /ip service www and www-ssl for using port 80 or 443
If Mikrotik isn't default route to internet for WEBserver say to me and I will explain how to do
For testing if it's working, you must test by other connectiont outside your LAN ( maybe smartphone without wifi)

Can't connect to my webserver from external source

I am having problems connecting to my website from a source outside my local network. I had another server before running the same site. The only difference is the old one was FreeBSD and now I'm trying it on Linux.
Here is my setup: I'm using Apache2. The server is behind a Netgear router. I'm using a Freedns host name. I have ddclient updating my ip.
Here is what happens: I can look at my site from the server in Chrome or my phone connected to the local wifi. It works using either the host name or ip address. It does not load from my cell phone or from my desktop using a proxy for either the host name or the ip address (the external one from googling my ip and from the router's wan info page). When I try the proxy with the host name I get "conection timed out" error, and when I try the ip address I get "couldn't connect to host error".
Here is what I've tried: I enabled port forwarding to the server from and to port 80 to my lan ip address. I disabled the firewall on the server. I double checked that the host name is directed to the right ip address. I ensured that the ip address does indeed point to my router. I've watched wireshark on my server while trying to connect and don't see any incoming requests when I try to load it from my phone.
It seems like maybe my port forwarding isn't working, but on my router it says that that port forwarding rule is active.
I'm out of ideas as to why what else could be going wrong.