Port Forwarding without hosting server - server

I just want to know if I can forward port 80 or 8080 or 21 on my router just to check if those ports are open to public. I don't have a server running on my PC though. I'm sure it's possible if a server is running and configured.

This is a very detailed link on how to do it , but i guess it is also depends on the router you've got .
http://www.pcworld.com/article/244314/how_to_forward_ports_on_your_router.html

Related

Issue getting my web server to work from external devices

I am attempting to set up an apache2 web server on my raspberry pi. I am able to connect to it by doing http://localhost:8080 (8080 because my router blocks port 80). Although when I do http://my.pub.lic.ip:8080 the connection times out. I set up port forwarding so that requests going to my router on port 8080 go to my raspberry pi on port 8080. This does not seem to work but I'm also not sure if the port forwarding is the cause or if it is something else. Any suggestions?
Is your web server configured to listen on the network interface besides localhost?
https://httpd.apache.org/docs/2.4/bind.html
For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:
Listen 80
Listen 8000
To make the server accept connections on port 80 for one interface, and port 8000 on another, use
Listen 192.0.2.1:80
Listen 192.0.2.5:8000
You can try using nmap by finding your router's public IP and on the raspberry pi type nmap my.pub.lic.ip This will show you what services are actually being published to the world. This gives more insight to the problem.
I got the web server up and running although for some reason it appears that my isp would only allow it to be hosted securely (as an https page)(I'm not sure if that's the right way to phrase it). To achieve this for free, I used cloudflare's ssl service. A tutorial to set it up for apache2 can be found here

Dataplicity unable to access port

I am having a problem in accessing ports with my Pi. I am using dataplicity to access it online.
I can access my page with this URL.
https://my_id.dataplicity.io
Can't access when I use this
https://my_id.dataplicity.io:9090/
But I can access it in my local.
http://localhost:9090/
What could possibly be the problem here?
Thanks!
At the present time wormhole forwards HTTP traffic to port 80 on your device but forwarding to other ports is not something that can be achieved by default.
The port forwarding feature is coming as part of our PRO pricing plan in future.
As an interim workaround, it is possible to redirect port 80 on your Pi to another local port on your Pi using a reverse proxy (for example using nginx). Although wormhole itself will still communicate with port 80 on your device, nginx could listen on port 80 and forward this to another local port of your choosing. Here's a nice article that could get you started:
https://www.keycdn.com/support/nginx-reverse-proxy/

How to make my XAMPP server public on the internet?

I am trying to make my XAMPP server public on the internet. But when i try to access it using my ip adress it says connection refuzed. I have followed lots of tutorials but most of them are for older versions. I have set the 80,443 ports on and have added them as a firewall exception but it still not working. Can you please give me some sugestions?
The idea is the same no matter the version of XAMPP you are using.
It's not clear if you configured port forward on your router (all connections on ports 80 or 443 will be forwarded to the XAMPP "server"). You should do this orderwise the incoming connection will never be redirected properly.
I am not sure if ISPs can block external access to ports 80 or 443, but you can also configure an alternative port, like 8000, to be forwarded to 80 internally, then you access your server using http://[your_public_IP]:8000
There are some sites you can use to check your public IP, like: http://whatismyipaddress.com/.

Connect to MongoDB sub-path

I'm trying to set up mongodb on webfaction. It works fine, currently running on port 36505 on the server. I can connect to it on the server just fine. But per the firewall, I can't connect to 36505 on the server from the 'net.
I can expose the port by mapping the port to port 80 under a sub-path. So I can make 1.1.1.1:36505 to 1.1.1.1:80/mongodb
My question is how do I actually connect to that? I'm not sure if mongo supports subpaths on port 80 or not...
The problem with what you are doing here is that the WebFaction firewall will prevent direct connections to your MongoDB instance because it isn't speaking straight HTTP and you don't have access to make it use port 80. The simple fix for this is to get a dedicated IP address and then have the support team open a hole in the firewall in order for you to connect directly to the database that way.
Here is an example on the WebFaction community page:
http://community.webfaction.com/questions/3448/using-websockets-with-a-nodejs-custom-app

Http Listener doesn't work on Port 8080 or other ports (works only on port 80)

I wrote a simple WebServer using HttpListener class (.net 2.0)
It seems that It doesn't work on port other then 80.
When i sniff the transport to my server i can see the Syn packets on Port 8080 arrive to the server, but there is no Syn/Ack response, although when i sue netstat -a i can see that the server is listening to port 8080 (i verified that my application is the one that listens)
HttpListener server = new HttpListener()
server.Prefixes.Add("http://192.168.4.133:8080/");
server.Start();
_log.Write("Waiting for a connection... ");
HttpListenerContext context = server.GetContext();
HttpListenerRequest request = context.Request;
HttpListenerResponse response = context.Response;
_log.Write("Got request for " + request.RawUrl);
the above code doesn't receive any Context (stuck at the line server.GetContext())
if i change the Prefix to "http://192.168.4.133/"
the above code works perfectly.
when i am testing it on Port 80, i am killing the IIS services, and making sure that my application is the one that listen to the relevant port.
i am running this on XP, so i don't think it is security issues....but you never know..
i have read about the httpcfg tool, but didnt really understood it...
is there something inherntly diffrent between listening on port 80 to listening on other ports? 8080 or even better another random user port?
Thanks,
Itay
I'd suggest checking your firewall, and if you don't find anything -- try to run another server on 8080 and check if it's working (so you know that it's the port, not the server).
Check if you're firewall is on or off and if on, whether prohibiting this port access.
You can termorarily turn it of for the test just to make sure.
Side note: No need to be hunting down and killing IIS processes, simply stop the IIS windows service (run the command "services.msc" to see a list)