-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help needed: When EC2 instance is stopped and restarted, VPN no longer works #6
Comments
The script is only executed once when the machine starts, not when it reboots. There are different reasons why it's not working anymore:
In any case, you can just create a new instance instead of re-using the same one. It would cost you the same. Have you tried this? |
Thanks for the quick reply. I modified the script to include a variable $DYNDNS_URL, then at the end of the script, it will automatically updates the dynamic DNS with the new IP address: This all works well. So for the second reason, it's usually not an issue for changed IP. I did try to start new instance, it works well. Just trying to figure out why the same script cannot be restarted. Thanks. |
@wyun the script is ran only the first time you boot the machine. Not every time. The ip addresses are saved in ipsec.conf and I think your problem is that they are not updated when you start the machine the second time. |
That makes sense. Thank you for the help. I will restart new instances then. |
Help needed:
When EC2 instance is stopped and restarted, VPN no longer works. The user script is the same, I wonder why restarting a working EC2 instance will not create a working VPN any more....
The text was updated successfully, but these errors were encountered: