How to Auto Change IP Address in VestaCP Topic is solved

Section with additional software for Vesta
mehargags
Posts: 715
Joined: Sat Sep 06, 2014 9:58 pm

Re: How to Auto Change IP Address in VestaCP  Topic is solved

Postby mehargags » Thu Feb 16, 2017 9:31 pm

I happened today on one of my VPS when my provider moved it to a different node and the IP changed.

My Provider migrated one of my VPS today to a different node, which changed its IP...
I did these steps:

Code: Select all

/usr/local/vesta/bin/v-update-sys-ip

which changed my IP in VestaCP but I still could not connect to my sites.

Then I did for all users:

Code: Select all

Rebuild Web

after which I started getting 500, meaning somehow apache was not accepting calls.

Checked all files in /etc/<apache><nginx> and they were properly changed, all virtual servers nginx and apache had the correct IP

Rebooted server 3 times... still no luck.

Then as a last try, I STOPPED firewall... and it worked!!!! Started Firewall again, it kept working. So I guess the IP tables rules needed to be flushed and recreated again to to avoid any cached policies.
Last edited by mehargags on Wed Jun 28, 2017 12:36 pm, edited 1 time in total.

blueberry
Posts: 22
Joined: Tue May 02, 2017 9:35 am

Re: How to Auto Change IP Address in VestaCP

Postby blueberry » Wed May 03, 2017 9:41 am

Not sure if this script will be suitable? Please advice if you can.

Currently, server is setup using dynamic IP via providers such as Dynamic DNS providers: DynDNS, NOIP, Dynu. And using ddclient to autoupdate WAN IP to Dynamic DNS provider.

So far, no issues accessing the website Domain from outside. FTP, SSH,... all ok.

One concern is the WAN IP might change sometimes, and i think in the IP section of VESTACP, "NAT IP association (optional)" might not be updated to the latest WAN IP?

One thing i saw is i can also run the "reread IP" feature in VESTACP under IP, which will update the WAN IP and LAN IP automatically.

Possible to use the CRON feature to auto-update this WAN IP? Or need to run this script?

mehargags
Posts: 715
Joined: Sat Sep 06, 2014 9:58 pm

Re: How to Auto Change IP Address in VestaCP

Postby mehargags » Wed May 03, 2017 7:02 pm

WAN IP has nothing to do with your VestaCP Server's IP. Leave it to the local IP that your Router gives you. Configure proper port forwarding on your router to that local IP. This way it doesn't matter what your WAN (public) IP is, it is automatically handled correctly by the router and your server keeps working on the internal static unchanged IP

blueberry
Posts: 22
Joined: Tue May 02, 2017 9:35 am

Re: How to Auto Change IP Address in VestaCP

Postby blueberry » Tue May 09, 2017 9:13 am

Thanks for your reply. Portforwarding was configured correctly in the beginning. So far everything works good.

But i realized that the WAN IP doesn't automatically update here with the latest IP: "NAT IP association (optional)" . I had to manually enter the WAN IP over here. Let me know if i missed out anything or any ways to make this updated automatically.

mehargags
Posts: 715
Joined: Sat Sep 06, 2014 9:58 pm

Re: How to Auto Change IP Address in VestaCP

Postby mehargags » Tue May 09, 2017 9:51 am

as I said before... if you have your router forwarding your WAN to a LAN IP... you don't need to configure the WAN IP on Vesta at all... just use the internal LAN IP and you are good.
Last edited by mehargags on Wed May 10, 2017 6:18 pm, edited 1 time in total.

blueberry
Posts: 22
Joined: Tue May 02, 2017 9:35 am

Re: How to Auto Change IP Address in VestaCP

Postby blueberry » Wed May 10, 2017 12:31 am

Thanks for your reply. Let me monitor this again. Router forwarding is setup.

tvegan
Posts: 1
Joined: Thu Dec 15, 2016 6:49 pm

Re: How to Auto Change IP Address in VestaCP

Postby tvegan » Wed Jun 28, 2017 2:25 am

Can anybody help me. Im kind of a newb to all this commands. My google instance ip change today and now vestacp server is down. Can somebody guide me on how to change the ip manually since option 1 doesn't work and error i got:

Resolving http://www.nobill.tv (http://www.nobill.tv)... 185.53.178.9
Connecting to http://www.nobill.tv (http://www.nobill.tv)|185.53.178.9|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-06-28 02:20:56 ERROR 403: Forbidden.

Any detail guiding instruction for option 2 is appreciated. I don't know how to execute those command scripts. Vestacp is running ubuntu 16 on nginx+php-fpm.

Thank You

skurudo
VestaCP Team
Posts: 7783
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: How to Auto Change IP Address in VestaCP

Postby skurudo » Tue Jul 25, 2017 9:08 am

tvegan wrote:Can anybody help me. Im kind of a newb to all this commands. My google instance ip change today and now vestacp server is down. Can somebody guide me on how to change the ip manually since option 1 doesn't work and error i got:


First post -> Option 2 - Long way Create it yourself
-> DigitalOcean competition - please, support us
-> fix for phpmyadmin - nice and sweet now


Return to “3rd Party Software”



Who is online

Users browsing this forum: No registered users and 1 guest