-1

I have an EC2 on AWS with Windows server. I would like to be able to change its IP very often. At the moment, I create several Elastic IPs and am able to associate one by one to the instance.

I got a domain name example.zapto.org from noip.com, I connect to example.zapto.org from my Mac via Microsoft Remote Desktop. I realize that every time I associate a different Elastic IP to the instance and change the IP of youxiang.zapto.org, the remote connection is dropped.

I try to automate the above process by Python code, but it still disconnects.

Is there a way to avoid the remote disconnection and make the change of IP smoother?

2 Answers 2

2

Is there a way to avoid the remote disconnection?

No. If you disable or remove an address on an interface, the expected behavior is that existing connections are disconnected. This is due to the address that they were connected to no longer exists.

0

I don't know your architecture, but in principle it's possible to move the processing of disconnection to additional network layer, namely VPN. If you can afford having your RDP client to go through VPN, you can have fixed in-VPN IPs which you assign yourself, and then VPN will be reconnecting, not the inner connections (RDP or whatever), provided that it will detect and reconnect quickly enough. (That's not that easy as it sounds, and will still be not very robust: RDP and the like don't tolerate network brownouts.)

Other than that, it's impossible. If you need to maintain a connection to the system with floating IP, you need to adjust your architecture to handle reconnections gracefully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .