Get Jetty Sever instance by host and port - jetty

Is it possible to get Server instance by host and port?

Related

Make API requests on a remote server from Postman

I work on a remote server via ssh, I ran a service locally on the remote server but how can I hit API's from my local machine's Postman to the service API's on remote server.
I am able to make curl requests from the remote server but I am not able to do the ssh tunneling in Postman, what are the steps I should follow?
While both ssh and HTTP are protocols to communicate between client and server. The basic difference between SSH and HTTP;
I guess you know, but just for others/clarification - SSH means “Secure Shell”. It has a built-in username/password authentication system to establish a connection. Thing is, it uses Port 22 to perform the negotiation or authentication process for connection. Authentication of the remote system is done by providing a public-key from your machine.
The default Port for most Web-Servers to listen for requests is either Port 80 for HTTP or 443 for HTTPS
To make it work
You can either expose a Port on your remote server by defining a firewall rule (even though 80 should probably be open) and make your server listen to incoming requests on that Port.
OR
Now, if you wan't to making it publicly available
put both, your remote Server and your local machine in the same VPN Network - still your server needs to listen for HTTP requests on some Port.
If you are not using some kind of reverse proxy, make sure to specify the port you are contacting the server on e.g. http://localhost:8080

Unable to Setup\Connect to AWS Lightsail TCP Server

I have created a rust tcp server framework.
(https://github.com/HasinZaman/SingleThreadServer)
The framework works fine without any issue on my local machine; and on the localhost & private network on the aws lighsail instance.
The current tcp listener on the instance tries to bind to "0.0.0.0:80"
However, I am unable to connect to the webserver using the public Ip address on port 80.

How to use an AWS instance to connect to a server on my local computer?

I have an HTTP server running on my local computer, and I would like to be able to connect to it remotely. I would like to connect to a port on the aws instance and have it forwarded to my local computer. This is because my local computer can't be connected to directly. I would like to create a connection from my computer to the instance, and forward an incoming connection to my computer over that connection.
Edit: I am able to curl the website from the AWS instance, so the port forwarding works, but I can't connect to that port from outside.

Access Virtualbox guest from computer that is NOT host

I have a computer, let's call it linux#home.
I have a dedicated distant linux server, let's call it linuxHost#datacenter.
I have a virtualbox virtual machine running windows 7 on the dedicated server, let's call it windowsGuest#datacenter.
I set up a NAT network interface on windowsGuest through virtualbox manager.
windowsGuest#datacenter is running a service that needs to access an sql database on linuxHost#datacenter, and that works fine. The same service on windowsHost needs to listen to connections on an udp port, let's say 12345. windowsGuest can access internet, web browsing works properly (doesn't need to, but that works fine).
So, now i need linux#home tu run a client application that connects on udp port 12345 on windowsGuest#datacenter. What i did is configure a port forward on the NAT network i use for windowsGuest :
-host ip : 127.0.0.1
-host port : 12346
-protocol : UDP
-guest ip : 10.0.2.4 (which is windowsGuest#datacenter ip address)
-guest port : 12345
I expect that any connection on linuxHost#datacenter on UDP port 12346 would be forwarded to windowsGuest#datacenter UDP port 12345, but that doesn't seem to happen.
a few more information :
- windowsGuest#datacenter's firewall is turned OFF
- linuxHost#datacenter runs iptables and is configured to allow any connection from linux#home, both tcp and udp.
- linuxHost#datacenter 's iptables doesn't log any blocked packets.
- I don't want to turn off iptables since linuxHost#datacenter is running other services and i don't want to expose that.
- I cannot test the client application on linuxHost#datacenter
What did I do wrong? Should i manually forward connections from internet to linuxHost#datacenter on port udp 12346 to 127.0.0.1:12345? should i configure the NAT port forwarding differently? Am i totally wrong and that's not the way i should manage this situation?
Thanks to this answer i could manage what i wanted. I had to modify my NAT port forward in the virtualbox manager preferences. The host ip field can be left blank, so that connections from any ip address would be forwarded to the guest.

Amazon EC2 HTTP connection refused, but HTTP port is open

I created a new Ubuntu T2 Micro instance on EC2.
Created a new Elastic IP and selected "EIP used in: VPC"
Associated the address to my new EC2 Ubuntu instance.
I now have a Private IP and a Public/Elastic IP. No Public DNS.
My security group has SSH port 22 and HTTP port 80 open.
I can connect to the instance just fine through SSH using the Public IP, but when I try to browse to the Public IP through the browser it says connection refused. I can't ping it either.
I'm out of ideas.
Amazon EC2 HTTP connection refused, but HTTP port is open
That's already proven by the fact that you got 'connection refused'. If the port wasn't open it would have been 'connect timeout'.
'Connection refused' means that the service you tried to connect to wasn't listening at that port. Possibly it isn't started at all, or even installed.
You need to install a web server on your machine, such as Apache or Nginx. This is not provided by default in EC2.
go to security groups --> edit inbound rules --> add rule (add a custom TCP port 8888 with 0.0.0.0/0 ).
There are two major things that can happen to your web server.
Connection refused :- Which means there is no service running (http/JBOSS/nginx) on your server which is available to accept connections on port specified (which is 80 in this case)
Connection timed out :- Would mean server is not able to process any incoming connection hitting it at port 80. Once you fix the security group and your NACL (if you don't have a default one), then you need to re-check to see if it's service which is giving out the error, not to forget that the error response will change.