So I wanted to try to let one person connect to my WebSphere Application Server remotely. I've already opened up a port on my router, but I don't really know what is the port that WebSphere uses. I couldn't really find much on the internet, and WebSphere is a hell of a complex thing to handle.
I've already tested it on https://www.portchecktool.com/ so the port is not blocked by any firewall.
By connecting remotely I mean that I have a java web application up and running and I want this other person that is not inside my house to be able to get into the application and use it.
I'm using RAD IDE just in case it might help out knowing it.
So where can I find the port that my server uses, in order to then configure to forward connections to that port?
I don't know RAD, but there are a couple ways to find out looking at WebSphere itself. If you are already in the admin console, you can to go to Servers in the left pane, click on your server's name, look for the ports link on the right column, and expand that. Look for the defaulthost_secure (or plain defaulthost if not using https.) If you don't, find where WebSphere is installed on your filesystem. There is a file WAS_INSTALL_ROOT/profiles/profileName/logs/AboutThisProfile.txt that lists some common ports including defaulthost and defaulthost_secure.
Related
I am able to succesfully use my dropwizard application when accessing with localhosts, but it doesnt work when I access with a different machine. Is there something you need to do make your web application respond to hosts besides localhosts?
I know with flask you must run with the flask run --host=0.0.0.0 is there a setting in the config file which controls this.
If you connect from the same network you´ll probably have an windows firewall issue (if you run on windows) or any other firewall depending on the OS.
You´ll have to allow inbound connections for the specific application on or port 80/443 TCP.
If you´re trying to connect from another network then it probably still is the above but you also have to setup port-forwarding to the machine running your application.
If it´s HTTP, probably port 80. If HTTPS then probably 443, for any other protocol you have to find out the correct port.
Since it´s dropwizard it´s probably HTTP/HTTPS, depending if it has to be secure (definatly recommended for REST APIs)
I have started doing work with spring/hibernate to make webapps with java. I have made a basic app which is running on my localhost:8080 and I was wondering if there was an easy way to make it visible to someone else so they can see and use the webpage from their machine.
If They are on same network (ie a Home Network or Corporate Network) you just need to send them you ip and port (ie http://192.168.0.150:8080).
If you want to open your computer by the internet you need to setup you modem to open you 8080 port and need to discover you public IP ou contract a DDNS, like no-ip.
Maybe you can need to change some firewall configurations
If you don't want to configure firewall, port forward. you can try some dynamic dns service like www.no-ip.com, dyn, duck dns, freedns etc.
they will create a public url which will forward.
however at application level you may still need to configure the access permission like white list ip or address to listen
Can't access Tomcat using IP address
I have hosted my simple UDPServer program on AWS Ubuntu 14.04, it's working correctly their, but when i tried accessing it from my system, am not able to connect to it, surely it is, something to do with AWS firewall, so how can i make my UDP traffic to pass through it! And port of my UDP server is 2020.
Any help would be greatly appreciated!
Thanks.
I was also looking for possible workaround for this issue, but it's quite easy irrespective of what platform language you are using to develop socket program on AWS EC2, as am using Node.js nginx in my case, this should work for all supporting platforms.
Configure Security Group
In the AWS console, open the EC2 tab.
Select the relevant region and click on Security Group.
You should have an default security group if you
have launched an Elastic Beanstalk instance in that region for your
app.
click on Actions button at top, and select Edit inbound rules.
here in Type column select All UDP, or you can set some Custom UDP
rule as well to listen at your socket port.
And there just enter port of your UDP server 2020.
And that's it!
Note: If something is not working, check the "Events" tab in the Beanstalk application / environments and find out what went wrong.
I have a few applications hosted on Tomcat running a machine called test-websites throuhg port 8080. So they are accessible like this:
http://test-websites:8080/app1/
http://test-websites:8080/app2/
...
http://test-websites:8080/appN/
What I need to do is make these applications accessible on my local network by:
http://app1.test-websites/
http://app2.test-websites/
...
http://appN.test-websites/
As I add new applications to Tomcat's webapps folder, I want them to be automatically available using the same subdomain pattern.
So I thought using Apache in front of Tomcat to make the URL rewriting would be a good idea, but so far I have not been able to configure the virtual host on Apache to make this redirect. I installed apache2 on port 80 and I see the default "It Works!" apache page when I access http://test-websites/, but I couldn't find how to make the redirects to the apps in the Tomcat following the format above.
I have searched for over 4 hours and didn't get an answer for this use case.. any help us much appreciated!
Thank you!
Eduardo
First you need to add a DNS entry for app1.test-websites, app2.test-websites,.. such that it points to test-websites. Generally CNAME entry works best in this case. If you only need the URLs to resolve on your local machine (for testing purpose), you can just update your /etc/hosts or C:\windows\system32\drivers\etc\hosts file. Otherwise you need to figure out how your company's network is setup and change the DNS entry (if it's a Windows domain network, normally there's a DNS service on the domain controller. On some smaller network you have to configure it on the router).
Next, the quickest way to achieve this is to not use apache2 to front it, bust simply have tomcat listening on port 80. You can setup virtual host on tomcat such that it serves different web-app depending on the URL requested.
I just set up a MySQL server on my PC for testing Java with JDBC.
At the moment "localhost" works perfectly as hostname for my applications, when running them on the same system.
However what would be the hostname for my MySQL server for applications that are running on different computers? Something like "my_ip:port" would work? I was thinking of writing an applet, which I could upload on a web server and try to connect to my database here. Is it possible to achieve that?
Something like "my_ip:port" would work?
If the MySQL instance has bound to your public interface, and if your firewall allows it, yes. If you connect to the 'net via a router that does NAT (for instance, a combined DSL modem and wireless router allowing you to connect multiple computers), you'll have to set up forwarding rules in the router to tell it which of the local machines to forward requests to.
You don't have to use an IP address. Your machine will also probably have a host name of some kind (either one you've assigned or, if you connect through an ISP, more likely one they've assigned). That would work too.
I was thinking of writing an applet, which I could upload on a web server and try to connect to my database here. Is it possible to achieve that?
With a signed Java applet, yes; otherwise, no. That's because the security sandbox that Java applets run in doesn't let them access servers other than the one they were loaded from (the web server).
A much better approach is to have your client-side code (Java applet, or just DHTML+Ajax stuff) talk to server-side code on the web server, which in turn talks to your DB. That way, the DB is never directly exposed to the outside world, and you don't have to do things like signed applets.
You can always use the ip address of the server running mysql as the hostname or its fully qualified domain name.
That should work, but you also should consider port-forwarding through your firewall.
Go here to get your IP: http://www.whatsmyip.org/
The port is the port mysql is setup on.