Page 1 of 1

Using VestCP with NO-IP Dynamic DNS

Posted: Sun Nov 27, 2016 7:09 pm
by Fatal1tybr
Hi people,

I currently live in Brazil and built 4 ethereum mining rigs (Or 4 servers), the specifications are these:

G4400 Pentium Dual Core 3,30ghz
8gb ddr4 2400mhz
240gb ssd
100mb/s downstream
50mb/s upstream

The mining thing don`t use much bandwitch.
I had an idea to start hosting websites and start profting with adsense and etc... But I use a brodband conection with dynamic IP... I could change it but the ISP will charge me much more expensive rates so I was thinking if there was a way to use the NO-IP service with vestaCP because if there is not I won`t use all the potential that I have of hardware.

Can you guys help me?

Re: Using VestCP with NO-IP Dynamic DNS

Posted: Mon Nov 28, 2016 6:13 am
by mehargags
It is not an easy thing to do whatsoever... you should have sound knowledge of how DNS works.

You have to first make an account and setup a domain name at Dyn DNS service like NoIP.
Then setup DDNS service in your Broadband Router (make sure you are not on a Double NAT'd ISP network).
Then Setup Port Forwarding on your router.

It is a complicated affair and not a good idea to run web servers on a dynamic home use IP.

Some References:
https://www.dynu.com/Resources/Tutorial ... gUpWebsite
http://www.noip.com/support/knowledgeba ... no-ip-com/
http://superuser.com/questions/253230/r ... ynamic-dns

Re: Using VestCP with NO-IP Dynamic DNS

Posted: Wed Nov 30, 2016 12:47 pm
by Rhandy
I have same situation And after read other topic on this forum I just adapt the script created for other user.

1º create one file called oldip with your actual ip address.
2º create a file DynupdateVestaDns with this:

Code: Select all

#!/bin/bash
if [ $(whoami) != 'root' ]; then
  echo "Must be root to run $0"
  exit 1;
fi
ip_old=`cat oldip` ### your oldip in file # first time is your actual ip
ip_new=`curl http://ipecho.net/plain`
declare -a user=$(v-list-sys-users plain)
for user in ${user[@]}; do
  sed -i "s/${ip_old}/${ip_new}/g" /usr/local/vesta/data/users/${user}/dns/*
  v-rebuild-dns-domains ${user}
done
echo $ip_new >oldip # update ip in oldip for next use
exit 0
3º just execute this script as cronjob (both files in same directory)

this update DNS for All Users.

Re: Using VestCP with NO-IP Dynamic DNS

Posted: Wed Nov 30, 2016 10:12 pm
by skamasle
You not only need think in nginx, also you need fix apache and nginx vhosts and orther files.

This can be easy whit a internal proxy maybe virtual server insite main server, one change ips and do a proxy pass to vestacp ( vestacp never change ips and you not need scripts, restars and orther things )

Just do a haproxy, varnish or nginx main server this will litesten to internet and vesta will just working in private ipadress.

Is a lite more complicated than that but you not need break your maind when vesta change something in vhost, dns etc all that changes will do main server.

Re: Using VestCP with NO-IP Dynamic DNS

Posted: Thu Dec 01, 2016 9:37 am
by mehargags
rotating IPs on the server level is a stupid thought, whatever you think!

you need this to handled at the router level as @skamasle already mentioned. Your internet router should be pointing to your internal IP which remains static!! Please read my first post.