TeamCity on EC2 - Can access it with private IP not public - amazon-ec2

We have TeamCity hosted on a Windows Box on AWS EC2. WE had 0 issues with this in the past and it's been working for years. However, this morning we had to restart the instance and the public IP was changed.
I have been unable to get TeamCity working ever since this happened. I can still access it through the private IP (visible for all internal networks in the EC2 cluster) but I can't access it remotely via the public IP.
Any thoughts on how to fix this?

Related

How to run application on port 3000 on Public and Not Private IP Address in AWS EC2 Instance (so it can be accessed on the internet)

My problem is that I want to run an application on an AWS EC2 instance on port 3000. I then want to be able to access it from the internet using http:/PUBLIC_IP:3000. The problem is that when I am running the application on the EC2 instance, it runs on the private IP - and therefore I cant access it from the internet. How would I make sure that the app will run on the public ip, or how would I set it up, so I can access the application over the internet?
I tried to find a solution online, but some hours later I find myself in here.
Thank you for your help. It was very helpful in debugging the error. It turned out that the security group of the EC2 instance was not allowing traffic on port 3000 so I had to add that - and then it worked.
I furthermore had trouble putting it behind a Load Balancer. The solution to that was that it was a webpack application and in .webpack there is a configuration file where you can add e.g., allowedHosts: [.amazonaws.com].

Reachability Analyzer shows not reachable from my IGW to Ec2 instance which is why i think might be getting (failed)net::ERR_CONNECTION_REFUSED error

I am just testing out Apis in my local and they all seem to work pretty good with localhost:8080. So i just uploaded the whole application to ec2 instance.
I uploaded my Local Springboot Application to the Ec2 instance, got the vpc, public & private subnets, got proper route tables, and when i try java -jar demoApplication-SNAPSHOT.jar from my SSH terminal, it seems to be running on port 8081 in the server. But when i try to click on the public ipv4 DNS address on ec2 instance, it says the site is not reachable.
I have allowed the chrome browser through firewall too but even that isn't working. Any help on this will be gladly appreciated!
below is the snippet from postman for the reference.
enter image description here

Promote server to a domain controller to join domain across internet

I have been facing this issue well over couple of weeks now. I can use some guidance and help.
Current Setup:
Aws ec2 instance (windows 2012 r2 server) hosting "abcd.com" domain. It is also a DNS server. Also, Elastic public IP has been attached.
Server I am promoting is in different VPC (let's say my own personal computer). Also running windows server 2012 r2. Configured DNS settings to point to Elastic public IP of aws instance.
I am able to perform "nslookup abcd.com" which returns private ip of the aws instance. Unable to perform ping though (since it resolves to private ip).
I tried configuring the dns entry on aws instance so it maps to elastic public ip. after that i was able to ping "abcd.com". But this seemed dirty to me.
Overall, I am not able to promote my pc to the domain controller which is on aws instance. If I put domain controller and server being promoted in same network, it works like a charm (don't even need a public IP in that case). But keeping it in separate networks things aren't working for me. Your inputs would be greatly appreciated.

I suddenly cannot connect to my EC2 instance. Why? How can I mitigate this?

I had a running instance, and then I became unable to connect to it via http(80) and ssh(22). I tried to reboot the instance, but nothing went up. This has happened to me twice in the past month.
Why does it happen? Can I do anything to fix and/or prevent it from happening?
If I launch a new instance in same region, and it works.
Things to check when trying to connect to an Amazon EC2 instance:
Security Group: Make sure the security group allows inbound access on the desired ports (eg 80, 22) for the appropriate IP address range (eg 0.0.0.0/0). This solves the majority of problems.
Public IP Address: Check that you're using the correct Public IP address for the instance. If the instance is stopped and started, it might receive a new Public IP address (depending on how it has been configured).
VPC Configuration: Accessing an EC2 instance that is launched inside a Virtual Private Cloud (VPC) requires:
An Internet Gateway
A routing table connecting the subnet to the Internet Gateway
NACLs (Network ACLS) that permit through-traffic
If you are able to launch and connect to another instance in the same subnet, then the VPC configuration would appear to be correct.
The other thing to check would be the actual configuration of the operating system on the instance itself. Some software may be affecting the configuration so that the web server / ssh daemon is not working correctly. Of course, that is hard to determine without connecting to the instance.
If you are launching from a standard Amazon Linux AMI, ssh would work correctly anytime. The web server (port 80) would require installation and configuration of software on the instance, which is your responsibility to maintain.

DEIS no public IP's

Following the instructions here :
https://github.com/deis/deis/tree/master/contrib/ec2
to deploy Deis to EC2 into a VPC, Cloudformation stack start up and creates the instances, however the instances does not have public IP's, the subnet the instances are launched into does have auto assign public IP's enabled.
So, without the public IP's I am not sure how to connect to the instances with fleet.
Anyone have any idea's on what I am missing?
By default, the provision scripts don't assign public IP addresses because the assumption is that the VPC you're provisioning into is internal to your network and that you have other means of access (like VPN).
However, you can easily provision your instances with public IPs by changing this line to True and redeploying.
We know this is confusing, and we're working to rewrite our EC2 provisioning scripts. Thanks for sticking with us!
You need to get your computer connected into the VPC somehow, try this and see if you can VPN into your VPC using it.

Resources