Can't find which port to use in port forwarding - webserver

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.

Related

Need help in port forwarding webserver from my rpi to external ip

I need help port forwarding my webserver from my local ip to external ip.
I have already tried setting up rules in my router for port 8080 (this is the current port for local ip as well (http://localhost:8080)) (Image Attached)
I am using Huawei Router: HG8145V5
I cannot access the webpage from my external ip it shows site cant be reached took too long to respond.
I'm sure its something wrong or extra needed with the port forwarding but cannot find out why.
The webpage is running on apache2.
Port Forward Rules
Webpage Running on 192.168.1.13:8080
I just found out i needed to unable dmz in forwarding rules to enable networking port forwards.

Unable to access jetty server with local IP address

I have configured jetty-maven-plugin in my eclipse Mars and I can run the server using jetty start and stop goals. I can able to access the website using http://localhost:8080/myapp but not using local IP address(i.e., http://192.168.0.5:8080/myapp) from my own computer or other computers connected in the same network via LAN and Wi-Fi.
As mentioned as a solution in these posts,
how to make jetty server accessible from LAN?
Configuring Jetty to accept connections from all hosts
I configured the server host to 0.0.0.0 from localhost to listen on all hosts. With this setting I can see on server start log,
INFO:oejs.AbstractConnector:Started SelectChannelConnector#0.0.0.0:8080
and it works only on http://localhost:8080 but it's not accessible from http://192.168.0.5:8080.
I also tried running that if the interface is accessible using the Networks Interface Listing as mentioned in this comment. and I got,
Display name: NETGEAR WNA1000M N150 Wireless USB Micro Adapter
Name: wlan4
InetAddress: /192.168.0.5
I also tried turning off my Windows Firewall/antivirus but din't help. My jetty version is <jetty.version>9.3.0.M1</jetty.version> and JDK 1.7. What could be the problem? Any help is appreciated.
McAfee Endpoint Security was the culprit here. It was blocking the requests with IP addresses from my very own computer. Turned off the firewall inside the Antivirus and I was able to access the site with http://192.168.0.5:8080/mysite from the browser and other devices connected through the network.
Sometimes some other program opens your port on external address before you do that with Jetty. It will receive all traffic instead. On Windows you will not know it if you reuse port (that is Jetty's default behavior). Check with netstat -ano what is the IP of the process that is indeed listening on 0.0.0.0:8080. Verify if it is your Jetty process only.
Then try connecting with telnet or netcat and see if you can open the connection and what is the response.

Access local site with subdomain on iPhone

I understand that you can access your computer's local site from a mobile device running on the same network by entering your computer's IP address (with relevant local port) into the address bar. However, I often use subdomains for development. On my local I access subdomains using lvh.me. For example:
blog.lvh.me
However, this will not work for mobile because lvh.me is redirecting to the IP 127.0.0.1 .
Is there a way to access a subdomain on an IP address? Essentially, doing the same thing as the above code but allowing for a dynamic IP address depending on the IP my computer has at the time?
So, after continuing research, I found an awesome tool that allows for exactly the above functionality:
xip.io
For example, if my computer has the IP address of 124.4.1.3 and I was running a web server at blog.lvh.me, where lvh.me redirects to localhost or 127.0.0.1, I could access my computer's localhost from another device on the network using blog.124.4.1.3.xip.io
I hope that helps someone!
Sidenote: The app in question was running on a rails server and the above setup required the following setting to be added to the environments/development.rb file:
config.action_dispatch.tld_length = 5
As rails was running on port 3000, this also required a url like:
blog.124.4.1.3.xip.io:3000

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.

Mobile App Connecting to my local web server

Looking for assistance on why I can access my local web server when I'm on my wireless network but not from my mobile phone (when not connected to wifi). I have tried using dyndns, wan ip, regular ip address but I can't see to grasp what I should be doing. I have my MAMP server running and php on 8888 for which the appropriate php file runs successfully when I'm logged into my network. I'm just trying to access this now from the public domain and I'm not sure what i need to do.
Any help would be greatly appreciated!!
Thanks,
Dan
You need to get your router to forward the external requests to the correct internal computer & port.
I.e. any external requests to port 8888 should be forwarded to your computer's IP address on port 8888. Most routers will have this option in the admin panel somewhere.
[EDIT]
This website might be able to help - http://portforward.com/english/routers/port_forwarding/routerindex.htm