webdigi / AWS-VPN-Server-Setup

Setup your own private, secure, free* VPN on the Amazon AWS Cloud in 10 minutes. CloudFormation
Other
762 stars 163 forks source link

After rebooting the ec2 instance doesn't work anymore #10

Closed zazoomauro closed 8 years ago

zazoomauro commented 8 years ago

After rebooting the ec2 instance connects fine to the VPN but the client doesn't have internet access anymore.

webdigi commented 8 years ago

are you sure you have not changed any other setting? also why did you have to restart the instance?

zazoomauro commented 8 years ago

100% sure My test was create the cloudfront VPN. VPN Connection fine and internet client fine Reboot the VPN ec2 instance. VPN Connection fine and not client internet

zazoomauro commented 8 years ago

@webdigi I restarted the instance by mistake...

webdigi commented 8 years ago

ok. not sure why a restart causes issues. please try another instance if possible and confirm if it works.

zazoomauro commented 8 years ago

I have a new one and is working fine without rebooting it 😉

Sent from my iPhone

On 14 Apr 2016, at 14:19, Webdigi - Web Development notifications@github.com wrote:

ok. not sure why a restart causes issues. please try another instance if possible and confirm if it works.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

chhantyal commented 8 years ago

That's because EC2 public IP might change when you reboot server. @webdigi What about adding option to attach Elastic IP just after instance is created and use that IP? This way, reboot issue could be solved.

webdigi commented 8 years ago

See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-reboot.html

"When you reboot an instance, it remains on the same physical host, so your instance keeps its public DNS name, private IP address, and any data on its instance store volumes." It should keep the same DNS name and public IP.

Adding elastic IP would increase cost & add additional fields in the configuration. Most users shut down and create new VPN as that is easier.