- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Hello.
It is possible to attach multiple Elastic IP addresses to an EC2 instance.
The number of ENIs that can be set varies depending on the instance type, so please check the document below.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI
You will need to follow the steps in the document below to add the secondary private IP and then add the corresponding Elastic IP address.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html#working-with-multiple-ipv4
I think it depends on the reason why you want to change the port number, but I thought that if SSH connections were controlled by security groups, there would be no need to change it.
You can allocate a 2nd IP to an EC2 instance by allocating a 2nd elastic IP, however both ports 2222 and 4444 will be available on BOTH IP addresses.
I dont believe there is any way around this.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr
Thanks for your reply.
I read that I cannot associate two elastic IP to an instance:
"If you associate an Elastic IP address with an instance that already has an Elastic IP address associated, the previously associated Elastic IP address will be disassociated, but the address will still be allocated to your account".
But I understand that I need to associate a new elastic IP to a Network Interface, not an Instance.
In this case I need to create a new network interface (eni) and new private IP? And how can I associate the new eni to my instance too?
In my particular case I don't need to change the SSH port number. It was just an example to illustrate my needs in simple way.
I'm building two IRC Servers in the same host that listening in default 6697 port and other in 7697 port. But for external, I need booth listening in 6697 default port. So, one IRC server accessible by one public IPv4 address, and other IRC Server by second public IPv4 address.
But in my unix host, if I can filter the origin (first or second interface), I can redirect the port <second IP>:6697 to HOST:7697.
Thanks in advance Rafael Grether